fix some bugs with the filter editor

This commit is contained in:
jonaswinkler 2020-12-29 17:32:56 +01:00
parent 7f4cfc0b76
commit 2b341afcae

View File

@ -80,13 +80,16 @@ export class FilterEditorComponent implements OnInit, OnDestroy {
this.dateAddedBefore = rule.value
break
case FILTER_HAS_TAG:
this.tagSelectionModel.set(+rule.value, ToggleableItemState.Selected, false)
this.tagSelectionModel.set(rule.value ? +rule.value : null, ToggleableItemState.Selected, false)
break
case FILTER_HAS_ANY_TAG:
this.tagSelectionModel.set(null, ToggleableItemState.Selected, false)
break
case FILTER_CORRESPONDENT:
this.correspondentSelectionModel.set(+rule.value, ToggleableItemState.Selected, false)
this.correspondentSelectionModel.set(rule.value ? +rule.value : null, ToggleableItemState.Selected, false)
break
case FILTER_DOCUMENT_TYPE:
this.documentTypeSelectionModel.set(+rule.value, ToggleableItemState.Selected, false)
this.documentTypeSelectionModel.set(rule.value ? +rule.value : null, ToggleableItemState.Selected, false)
break
}
})