diff --git a/src/renderer/components/item-object-list/content.tsx b/src/renderer/components/item-object-list/content.tsx index af64731d40..08392359ec 100644 --- a/src/renderer/components/item-object-list/content.tsx +++ b/src/renderer/components/item-object-list/content.tsx @@ -203,31 +203,43 @@ export class ItemListLayoutContent extends React.Component } renderTableHeader() { - const { customizeTableRowProps, renderTableHeader, isSelectable, isConfigurable, store } = this.props; + const { renderTableHeader } = this.props; if (!renderTableHeader) { return null; } - const enabledItems = this.props.getItems().filter(item => !customizeTableRowProps(item).disabled); - return ( - {isSelectable && ( - store.toggleSelectionAll(enabledItems))} - /> - )} - {renderTableHeader.map((cellProps, index) => ( - this.showColumn(cellProps) && ( - - ) - ))} - - {isConfigurable && this.renderColumnVisibilityMenu()} - + + {() => { + const { store, isConfigurable, isSelectable, customizeTableRowProps } = this.props; + const enabledItems = this.props.getItems().filter(item => !customizeTableRowProps(item).disabled); + + return ( + <> + {isSelectable && ( + + store.toggleSelectionAll(enabledItems), + )} + /> + )} + {renderTableHeader.map( + (cellProps, index) => + this.showColumn(cellProps) && ( + + ), + )} + + {isConfigurable && this.renderColumnVisibilityMenu()} + + + ); + }} + ); }