Skip to content

Commit

Permalink
Avoid browser freeze when copy paste icon in icon picker
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Nov 15, 2022
1 parent bda5b97 commit 4af2379
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ha-icon-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ export class HaIconPicker extends LitElement {
filteredItems.push(...filteredItemsByKeywords);

if (filteredItems.length > 0) {
this.comboBox.filteredItems = filteredItems;
setTimeout(() => {
this.comboBox.filteredItems = filteredItems;
}, 1);
} else {
this.comboBox.filteredItems = [{ icon: filterString, keywords: [] }];
}
Expand Down

0 comments on commit 4af2379

Please sign in to comment.