mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Consolidate way of passing items to ItemListLayout (#4850)
This commit is contained in:
1 parent
e626cc91d4
commit
668ac58cb3
5 files changed
+13
-7
No files matched your search
@@ -41,8 +41,7 @@ export type HeaderCustomizer = (placeholders: HeaderPlaceholders) => HeaderPlace
|
||||
export interface ItemListLayoutProps<I extends ItemObject> {
|
||||
tableId?: string;
|
||||
className: IClassName;
|
||||
items?: I[];
|
||||
getItems?: () => I[];
|
||||
getItems: () => I[];
|
||||
store: ItemStore<I>;
|
||||
dependentStores?: ItemStore<ItemObject>[];
|
||||
preloadStores?: boolean;
|
||||
@@ -213,7 +212,7 @@ class NonInjectedItemListLayout<I extends ItemObject> extends React.Component<It
|
||||
}
|
||||
}
|
||||
|
||||
const items = this.props.getItems?.() ?? this.props.items ?? this.props.store.items;
|
||||
const items = this.props.getItems();
|
||||
|
||||
return applyFilters(filterItems.concat(this.props.filterItems), items);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user