Skip to content

Commit

Permalink
show icon while searching
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaLarina committed May 31, 2024
1 parent c48be5d commit f7f34f3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,16 @@ export class ListModel<T extends BaseAction = Action> extends ActionContainer<T>
let actions = super.getRenderedActions();

if (this.filterString) {
let newActions = [] as Array<T>;
let newActions: Array<T> = [];
actions.forEach(action => {
newActions.push(action);
if (action.items) action.items.forEach(item => newActions.push(item as T));
if (action.items) {
action.items.forEach(item => {
const a = new Action(item);
a.iconName = action.iconName;
newActions.push(a as IAction as T);
});
}
});
return newActions;
}
Expand Down

0 comments on commit f7f34f3

Please sign in to comment.