Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
driskull committed Dec 19, 2024
1 parent a5efee7 commit 8a2e865
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions packages/calcite-components/src/components/list/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class List
}

this.listItems = items;
if ((this.filterEnabled || !!this.filterPredicate) && this.willPerformFilter) {
if (this.filterEnabled && this.willPerformFilter) {
this.willPerformFilter = false;
this.dataForFilter = this.getItemData();

Expand Down Expand Up @@ -437,7 +437,8 @@ export class List
(changes.has("selectionAppearance") &&
(this.hasUpdated || this.selectionAppearance !== "icon")) ||
(changes.has("displayMode") && this.hasUpdated) ||
(changes.has("scale") && this.hasUpdated)
(changes.has("scale") && this.hasUpdated) ||
(changes.has("filterPredicate") && this.hasUpdated)
) {
this.handleListItemChange();
}
Expand Down Expand Up @@ -813,14 +814,12 @@ export class List
}

private getItemData(): ItemData {
return this.filterPredicate
? []
: this.listItems.map((item) => ({
label: item.label,
description: item.description,
metadata: item.metadata,
el: item,
}));
return this.listItems.map((item) => ({
label: item.label,
description: item.description,
metadata: item.metadata,
el: item,
}));
}

private updateGroupItems(): void {
Expand Down

0 comments on commit 8a2e865

Please sign in to comment.