mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix crash when finding CRD's preferred version (#4332)
This commit is contained in:
1 parent
4c83f5becf
commit
e51ff5051f
4 files changed
+53
-9
No files matched your search
@@ -98,6 +98,13 @@ export interface ItemListLayoutProps<I extends ItemObject> {
|
||||
customizeRemoveDialog?: (selectedItems: I[]) => Partial<ConfirmDialogParams>;
|
||||
renderFooter?: (parent: ItemListLayout<I>) => React.ReactNode;
|
||||
|
||||
/**
|
||||
* Message to display when a store failed to load
|
||||
*
|
||||
* @default "Failed to load items"
|
||||
*/
|
||||
failedToLoadMessage?: React.ReactNode;
|
||||
|
||||
filterCallbacks?: ItemsFilters<I>;
|
||||
}
|
||||
|
||||
@@ -114,7 +121,8 @@ const defaultProps: Partial<ItemListLayoutProps<ItemObject>> = {
|
||||
hasDetailsView: true,
|
||||
onDetails: noop,
|
||||
virtual: true,
|
||||
customizeTableRowProps: () => ({} as TableRowProps),
|
||||
customizeTableRowProps: () => ({}),
|
||||
failedToLoadMessage: "Failed to load items",
|
||||
};
|
||||
|
||||
@observer
|
||||
@@ -322,7 +330,7 @@ export class ItemListLayout<I extends ItemObject> extends React.Component<ItemLi
|
||||
|
||||
renderNoItems() {
|
||||
if (this.failedToLoad) {
|
||||
return <NoItems>Failed to load items.</NoItems>;
|
||||
return <NoItems>{this.props.failedToLoadMessage}</NoItems>;
|
||||
}
|
||||
|
||||
if (!this.isReady) {
|
||||
|
||||
Reference in new issue
Block a user