[ACS-4565] add search for categories tree in admin cc (#8279)

* ACS-4565 Added possibility to search categories

* ACS-4565 Fixed unit test

* ACS-4565 Fixed lint issue

* ACS-4565 Removed extra empty line

* ACS-4565 Replaced tags label with categories label in unit tests

* ACS-4565 Replaced tags label with categories label in doc
This commit is contained in:
AleksanderSklorz
2023-02-20 16:53:22 +01:00
committed by GitHub
parent 477d49eaee
commit 02dcd4fb48
11 changed files with 226 additions and 20 deletions

View File

@@ -122,11 +122,12 @@ export class TreeComponent<T extends TreeNode> implements OnInit {
*
* @param skipCount Number of root nodes to skip.
* @param maxItems Maximum number of nodes returned from Observable.
* @param searchTerm Specifies if categories should be filtered out by name or not. If not specified then returns categories without filtering.
*/
public refreshTree(skipCount?: number, maxItems?: number): void {
public refreshTree(skipCount?: number, maxItems?: number, searchTerm?: string): void {
this.loadingRootSource.next(true);
this.treeNodesSelection.clear();
this.treeService.getSubNodes('-root-', skipCount, maxItems).subscribe((response: TreeResponse<T>) => {
this.treeService.getSubNodes('-root-', skipCount, maxItems, searchTerm).subscribe((response: TreeResponse<T>) => {
this.treeService.treeNodes = response.entries;
this.treeNodesSelection.deselect(...response.entries);
this.paginationChanged.emit(response.pagination);