mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
fix title filter not removing filter rule
This commit is contained in:
@@ -46,7 +46,9 @@ export class FilterEditorViewService {
|
||||
set filterText(text: string) {
|
||||
let filterRules = this.filterRules
|
||||
let existingRule = filterRules.find(rule => rule.type.id == FILTER_TITLE)
|
||||
if (existingRule && existingRule.value == text) {
|
||||
if (existingRule && (!text || text.length == 0)) {
|
||||
filterRules.splice(filterRules.findIndex(rule => rule.type.id == FILTER_TITLE), 1)
|
||||
} else if (existingRule && existingRule.value == text) {
|
||||
return
|
||||
} else if (existingRule) {
|
||||
existingRule.value = text
|
||||
|
Reference in New Issue
Block a user