mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
added default for customizeTableRowProps
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
ec1573dc4c
commit
31dfe20d54
@ -89,7 +89,8 @@ const defaultProps: Partial<ItemListLayoutProps> = {
|
||||
filterItems: [],
|
||||
hasDetailsView: true,
|
||||
onDetails: noop,
|
||||
virtual: true
|
||||
virtual: true,
|
||||
customizeTableRowProps: () => ({} as TableRowProps),
|
||||
};
|
||||
|
||||
interface ItemListLayoutUserSettings {
|
||||
@ -241,7 +242,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
sortItem={item}
|
||||
selected={detailsItem && detailsItem.getId() === itemId}
|
||||
onClick={hasDetailsView ? prevDefault(() => onDetails(item)) : undefined}
|
||||
{...(customizeTableRowProps ? customizeTableRowProps(item) : {})}
|
||||
{...customizeTableRowProps(item)}
|
||||
>
|
||||
{isSelectable && (
|
||||
<TableCell
|
||||
@ -398,9 +399,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
return;
|
||||
}
|
||||
|
||||
const enabledItems = customizeTableRowProps
|
||||
? this.items.filter(item => !customizeTableRowProps(item).disabled)
|
||||
: this.items;
|
||||
const enabledItems = this.items.filter(item => !customizeTableRowProps(item).disabled);
|
||||
|
||||
return (
|
||||
<TableHead showTopLine nowrap>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user