diff --git a/src/Table.tsx b/src/Table.tsx index 0011381..414299d 100644 --- a/src/Table.tsx +++ b/src/Table.tsx @@ -92,7 +92,6 @@ export const Table = (props: TableProps) => { return loadingComponent; } - const numberOfColumns = 1 + columns.length + (!!onRowStatus ? 1 : 0); const numberOfVisibleSelectedRows = dataSource .filter((entry) => getLevelForKey(entry.id) === 0) .filter((entry) => selectedRowKeys.includes(entry.id)).length; @@ -103,6 +102,17 @@ export const Table = (props: TableProps) => { canClick={onRowDoubleClick !== undefined} readonly={readonly} > + {onSelectAllRecords && ( + + )} @@ -121,18 +131,6 @@ export const Table = (props: TableProps) => { - {onSelectAllRecords && ( - - )} - + {numberOfRealSelectedRows > numberOfTotalRows + ? allRowsAreSelected + : selectRowsComponent} ); };
- {numberOfRealSelectedRows > numberOfTotalRows - ? allRowsAreSelected - : selectRowsComponent} -