Skip to content

Commit

Permalink
Merge pull request #2678 from headlamp-k8s/fix-table-select-all-checkbox
Browse files Browse the repository at this point in the history
frontend: Fix memoization for Head cell when selecting all rows
  • Loading branch information
sniok authored Dec 16, 2024
2 parents b36a259 + 15ae14b commit 372ff2c
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 372ff2c

Please sign in to comment.