diff --git a/package-lock.json b/package-lock.json index 7950442..503ddfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gisce/react-formiga-table", - "version": "0.8.7-rc.0", + "version": "0.8.7-rc.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@gisce/react-formiga-table", - "version": "0.8.7-rc.0", + "version": "0.8.7-rc.1", "dependencies": { "react": "^16.8.0 || 17.x", "react-dom": "^16.8.0 || 17.x", diff --git a/package.json b/package.json index 67c3076..a148d37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gisce/react-formiga-table", - "version": "0.8.7-rc.0", + "version": "0.8.7-rc.1", "scripts": { "start": "while :; do tsc && vite build --watch --force; done", "build": "tsc && vite build", 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} -