mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 07:15:07 +01:00
Fix toggling off active items
This commit is contained in:
parent
f83185bfe4
commit
364df5c050
1 changed files with 2 additions and 2 deletions
|
|
@ -127,9 +127,9 @@ export class FilterEditorComponent implements OnInit, AfterViewInit {
|
|||
let filterRuleType: FilterRuleType = FILTER_RULE_TYPES.find(t => t.id == filterRuleTypeID)
|
||||
let existingRule = filterRules.find(rule => rule.type.id == filterRuleType.id)
|
||||
|
||||
if (existingRule && existingRule.value == item.id && filterRuleType.id == FILTER_HAS_TAG) {
|
||||
if (existingRule && existingRule.value == item.id) {
|
||||
filterRules.splice(filterRules.indexOf(existingRule), 1)
|
||||
} else if (existingRule && filterRuleType.id == FILTER_HAS_TAG) {
|
||||
} else if (existingRule && filterRuleType.id == FILTER_HAS_TAG) {
|
||||
filterRules.push({type: FILTER_RULE_TYPES.find(t => t.id == filterRuleType.id), value: item.id})
|
||||
} else if (existingRule && existingRule.value == item.id) {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue