@@ -7,7 +7,6 @@ import { TableProps } from "./types";
77import { Headers } from "./components/Headers" ;
88import { Rows } from "./components/Rows" ;
99import { useShiftSelected } from "./hooks/useShiftSelect" ;
10- import { SelectAllRecordsRow } from "./components/SelectAllRecordsRow" ;
1110
1211export const Table = ( props : TableProps ) => {
1312 const {
@@ -26,14 +25,6 @@ export const Table = (props: TableProps) => {
2625 onCellRender,
2726 readonly,
2827 selectionRowKeys : selectionRowKeysProps ,
29- translations = {
30- recordsSelected :
31- "{numberOfSelectedRows} records are selected from this page." ,
32- selectAllRecords : "Select all {totalRecords} records." ,
33- allRecordsSelected : "There are {totalRecords} records selected." ,
34- } ,
35- onSelectAllRecords,
36- totalItems = 0 ,
3728 } = props ;
3829
3930 const {
@@ -92,11 +83,6 @@ export const Table = (props: TableProps) => {
9283 return loadingComponent ;
9384 }
9485
95- const numberOfColumns = 1 + columns . length + ( ! ! onRowStatus ? 1 : 0 ) ;
96- const numberOfVisibleSelectedRows = dataSource
97- . filter ( ( entry ) => getLevelForKey ( entry . id ) === 0 )
98- . filter ( ( entry ) => selectedRowKeys . includes ( entry . id ) ) . length ;
99-
10086 return (
10187 < Container
10288 height = { height }
@@ -121,18 +107,6 @@ export const Table = (props: TableProps) => {
121107 </ tr >
122108 </ thead >
123109 < tbody >
124- { onSelectAllRecords && (
125- < SelectAllRecordsRow
126- numberOfColumns = { numberOfColumns }
127- numberOfVisibleSelectedRows = { numberOfVisibleSelectedRows }
128- numberOfRealSelectedRows = { selectedRowKeys . length }
129- numberOfTotalRows = { dataSource . length }
130- totalRecords = { totalItems }
131- translations = { translations }
132- onSelectAllRecords = { onSelectAllRecords }
133- loadingComponent = { loadingComponent }
134- />
135- ) }
136110 < Rows
137111 dataSource = { dataSource }
138112 columns = { columns }
0 commit comments