TSK-474 Change classification searcher input style and collapse tree after remove filter
This commit is contained in:
parent
4450002a81
commit
3545df7448
|
|
@ -16,7 +16,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
input.filter-input {
|
input.filter-input {
|
||||||
margin: 10px 0px;
|
margin: 10px 2px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
width: 100%;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ export class TaskanaTreeComponent implements OnInit, AfterViewChecked {
|
||||||
@Input() filterText: string;
|
@Input() filterText: string;
|
||||||
|
|
||||||
private filterTextOld: string
|
private filterTextOld: string
|
||||||
|
private beforeFilteringState: ITreeState;
|
||||||
|
|
||||||
options: ITreeOptions = {
|
options: ITreeOptions = {
|
||||||
displayField: 'name',
|
displayField: 'name',
|
||||||
|
|
@ -59,7 +60,8 @@ export class TaskanaTreeComponent implements OnInit, AfterViewChecked {
|
||||||
}
|
}
|
||||||
if (this.filterTextOld !== this.filterText) {
|
if (this.filterTextOld !== this.filterText) {
|
||||||
this.filterTextOld = this.filterText;
|
this.filterTextOld = this.filterText;
|
||||||
this.filterNodes(this.filterText)
|
this.filterNodes(this.filterText);
|
||||||
|
this.manageTreeState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,6 +107,11 @@ export class TaskanaTreeComponent implements OnInit, AfterViewChecked {
|
||||||
|| node.data.key.toUpperCase().includes(text.toUpperCase()));
|
|| node.data.key.toUpperCase().includes(text.toUpperCase()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
private manageTreeState() {
|
||||||
|
if (this.filterText === '') {
|
||||||
|
this.tree.treeModel.collapseAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue