Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: prevent focus loss from change detection in cf query dropdown (#11409)

shamoon80be6793cf5c
diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
index fecbaa170..9ffcc380b 100644
--- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
+++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
@@ -400,6 +400,9 @@ export class FilterEditorComponent
@Input()
set filterRules(value: FilterRule[]) {
+ if (value === this._filterRules) {
+ return
+ }
this._filterRules = value
this.documentTypeSelectionModel.clear(false)
@@ -1098,7 +1101,13 @@ export class FilterEditorComponent
rulesModified: boolean = false
updateRules() {
- this.filterRulesChange.next(this.filterRules)
+ const updatedRules = this.filterRules
+ this._filterRules = updatedRules
+ this.rulesModified = filterRulesDiffer(
+ this._unmodifiedFilterRules,
+ updatedRules
+ )
+ this.filterRulesChange.next(updatedRules)
}
get textFilter() {