Merge branch 'feature/SUPPORT-9410_fix' into develop

This commit is contained in:
adel.ka 2025-09-17 10:00:33 +03:00
commit 54365743d5
2 changed files with 24 additions and 5 deletions

View file

@ -282,6 +282,15 @@ export class DropdownTreeViewComponent extends InputControl {
} }
} }
clearValue() {
if (this.webbpmStorage) {
this.cachedValue = null;
this.webbpmStorage.delete(this.storageKey);
}
super.clearValue();
}
onChange() { onChange() {
super.onChange(); super.onChange();
this.valueChangeEvent.trigger(this.value); this.valueChangeEvent.trigger(this.value);

View file

@ -5,15 +5,20 @@ import {DropdownTreeViewComponent} from "../field/DropdownTreeViewComponent";
export class DropdownTreeViewFilterComponent extends FilterComponent { export class DropdownTreeViewFilterComponent extends FilterComponent {
public isBusinessId: boolean; public isBusinessId: boolean;
private treeViewComponent: DropdownTreeViewComponent;
initialize() {
super.initialize();
this.treeViewComponent = this.getScript(DropdownTreeViewComponent) as DropdownTreeViewComponent;
}
public getFilter(): Filter { public getFilter(): Filter {
let treeViewComponent = this.getScript(DropdownTreeViewComponent) as DropdownTreeViewComponent; let model = this.treeViewComponent.value;
let model = treeViewComponent.value;
if (!model && treeViewComponent.cachedValue) { if (!model && this.treeViewComponent.cachedValue) {
let value = this.isBusinessId let value = this.isBusinessId
? treeViewComponent.cachedValue.businessId ? this.treeViewComponent.cachedValue.businessId
: treeViewComponent.cachedValue.id; : this.treeViewComponent.cachedValue.id;
return FilterUtil.singleValueFilter(this.getObjectId(), value, this.operation); return FilterUtil.singleValueFilter(this.getObjectId(), value, this.operation);
} }
else if (model) { else if (model) {
@ -24,4 +29,9 @@ export class DropdownTreeViewFilterComponent extends FilterComponent {
return null; return null;
} }
} }
resetFilter(): Promise<void> | void {
this.treeViewComponent.clearValue();
return super.resetFilter();
}
} }