@@ -123,7 +123,7 @@ function DataTable<T>(props: TableProps<T>): JSX.Element {
123
123
footer = defaultProps . footer ,
124
124
currentSortColumnId = defaultProps . currentSortColumnId ,
125
125
currentSortDirection = defaultProps . currentSortDirection ,
126
- isInnerTable = defaultProps . isInnerTable ,
126
+ // isInnerTable = defaultProps.isInnerTable,
127
127
} = props ;
128
128
129
129
const {
@@ -139,27 +139,27 @@ function DataTable<T>(props: TableProps<T>): JSX.Element {
139
139
} = useColumns ( columns , onColumnOrderChange , defaultSortFieldId , defaultSortAsc ) ;
140
140
141
141
// Find index of last freezed column
142
- const index = React . useMemo (
143
- ( ) =>
144
- tableColumns . reduce ( ( i , column ) => {
145
- if ( column . freeze ) {
146
- i += 1 ;
147
- }
148
- return i ;
149
- } , 0 ) ,
150
- [ tableColumns ] ,
151
- ) ;
152
-
153
- const tableColumnsBasedOnTable = React . useMemo ( ( ) => {
154
- if ( ! isInnerTable ) {
155
- return tableColumns ;
156
- }
157
- return tableColumns . slice ( 0 , index ) ;
158
- } , [ index , isInnerTable , tableColumns ] ) ;
159
-
160
- const freezedColumns = React . useMemo ( ( ) => {
161
- return tableColumns . slice ( 0 , index ) ;
162
- } , [ index , tableColumns ] ) ;
142
+ // const index = React.useMemo(
143
+ // () =>
144
+ // tableColumns.reduce((i, column) => {
145
+ // if (column.freeze) {
146
+ // i += 1;
147
+ // }
148
+ // return i;
149
+ // }, 0),
150
+ // [tableColumns],
151
+ // );
152
+
153
+ // const tableColumnsBasedOnTable = React.useMemo(() => {
154
+ // if (!isInnerTable) {
155
+ // return tableColumns;
156
+ // }
157
+ // return tableColumns.slice(0, index);
158
+ // }, [index, isInnerTable, tableColumns]);
159
+
160
+ // const freezedColumns = React.useMemo(() => {
161
+ // return tableColumns.slice(0, index);
162
+ // }, [index, tableColumns]);
163
163
164
164
const [
165
165
{
@@ -498,7 +498,7 @@ function DataTable<T>(props: TableProps<T>): JSX.Element {
498
498
</ >
499
499
) }
500
500
501
- { tableColumnsBasedOnTable . map ( column => (
501
+ { tableColumns . map ( column => (
502
502
< Column
503
503
key = { column . id }
504
504
column = { column }
@@ -546,7 +546,7 @@ function DataTable<T>(props: TableProps<T>): JSX.Element {
546
546
key = { id }
547
547
keyField = { keyField }
548
548
data-row-id = { id }
549
- columns = { tableColumnsBasedOnTable }
549
+ columns = { tableColumns }
550
550
row = { row }
551
551
rowCount = { sortedData . length }
552
552
rowIndex = { i }
@@ -597,11 +597,11 @@ function DataTable<T>(props: TableProps<T>): JSX.Element {
597
597
</ Wrapper >
598
598
</ ResponsiveWrapper >
599
599
600
- { freezedColumns . length > 0 && (
600
+ { /* { freezedColumns.length > 0 && (
601
601
<div
602
602
style={{
603
603
position: 'absolute',
604
- top : 0 ,
604
+ top: '200px' ,
605
605
left: 0,
606
606
maxWidth: '100%',
607
607
}}
@@ -715,7 +715,7 @@ function DataTable<T>(props: TableProps<T>): JSX.Element {
715
715
</Table>
716
716
{footer && <div>{footer}</div> }
717
717
</div>
718
- ) }
718
+ )} */ }
719
719
</ div >
720
720
721
721
{ enabledPagination && (
0 commit comments