Skip to content

Commit

Permalink
frontend: Fix memoization for Head cell when selecting all rows
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Dubenko <[email protected]>
  • Loading branch information
sniok committed Dec 13, 2024
1 parent 22688fa commit 15ae14b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions frontend/src/components/common/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,7 @@ export default function Table<RowItem extends Record<string, any>>({
isFiltered={header.column.getIsFiltered()}
sorting={header.column.getIsSorted()}
showColumnFilters={table.getState().showColumnFilters}
selected={
table.getIsAllRowsSelected()
? 'all'
: table.getIsSomeRowsSelected()
? 'some'
: 'none'
}
selected={table.getSelectedRowModel().flatRows.length}
/>
))}
</StyledHeadRow>
Expand All @@ -400,7 +394,7 @@ const MemoHeadCell = memo(
header: MRT_Header<any>;
sorting: string | false;
isFiltered: boolean;
selected: any;
selected: number;
showColumnFilters: boolean;
}) => {
return (
Expand Down

0 comments on commit 15ae14b

Please sign in to comment.