Merge branch 'feature/SUPPORT-9410_fix' into develop
This commit is contained in:
commit
54365743d5
2 changed files with 24 additions and 5 deletions
|
|
@ -282,6 +282,15 @@ export class DropdownTreeViewComponent extends InputControl {
|
|||
}
|
||||
}
|
||||
|
||||
clearValue() {
|
||||
if (this.webbpmStorage) {
|
||||
this.cachedValue = null;
|
||||
this.webbpmStorage.delete(this.storageKey);
|
||||
}
|
||||
|
||||
super.clearValue();
|
||||
}
|
||||
|
||||
onChange() {
|
||||
super.onChange();
|
||||
this.valueChangeEvent.trigger(this.value);
|
||||
|
|
|
|||
|
|
@ -5,15 +5,20 @@ import {DropdownTreeViewComponent} from "../field/DropdownTreeViewComponent";
|
|||
export class DropdownTreeViewFilterComponent extends FilterComponent {
|
||||
|
||||
public isBusinessId: boolean;
|
||||
private treeViewComponent: DropdownTreeViewComponent;
|
||||
|
||||
initialize() {
|
||||
super.initialize();
|
||||
this.treeViewComponent = this.getScript(DropdownTreeViewComponent) as DropdownTreeViewComponent;
|
||||
}
|
||||
|
||||
public getFilter(): Filter {
|
||||
let treeViewComponent = this.getScript(DropdownTreeViewComponent) as DropdownTreeViewComponent;
|
||||
let model = treeViewComponent.value;
|
||||
let model = this.treeViewComponent.value;
|
||||
|
||||
if (!model && treeViewComponent.cachedValue) {
|
||||
if (!model && this.treeViewComponent.cachedValue) {
|
||||
let value = this.isBusinessId
|
||||
? treeViewComponent.cachedValue.businessId
|
||||
: treeViewComponent.cachedValue.id;
|
||||
? this.treeViewComponent.cachedValue.businessId
|
||||
: this.treeViewComponent.cachedValue.id;
|
||||
return FilterUtil.singleValueFilter(this.getObjectId(), value, this.operation);
|
||||
}
|
||||
else if (model) {
|
||||
|
|
@ -24,4 +29,9 @@ export class DropdownTreeViewFilterComponent extends FilterComponent {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
resetFilter(): Promise<void> | void {
|
||||
this.treeViewComponent.clearValue();
|
||||
return super.resetFilter();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue