1
- import React , { useState , useEffect , useRef , useMemo } from 'react' ;
1
+ import React , { useState , useRef , useMemo } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
3
import classNames from 'classnames' ;
4
- import { tagPropType , mapToCssModules } from './Shared/helper.js' ;
4
+ import { tagPropType } from './Shared/helper.js' ;
5
5
import Slot from './Shared/Slot' ;
6
6
import { CIcon } from '@coreui/icons-react' ;
7
7
import CSpinner from './CSpinner' ;
@@ -50,8 +50,8 @@ const CDataTable = props=>{
50
50
loading,
51
51
change,
52
52
onChange,
53
- customContent,
54
- ...attributes
53
+ // customContent,
54
+ // ...attributes
55
55
} = props ;
56
56
57
57
//Object.assign(style, cssModule)
@@ -68,7 +68,7 @@ const CDataTable = props=>{
68
68
} ) ;
69
69
const [ tableFilterState , setTableFilterState ] = useState ( tableFilterValue ) ;
70
70
const [ columnFilterState , setColumnFilterState ] = useState ( { } ) ;
71
- const [ page , setPage ] = useState ( activePage || 1 ) ;
71
+ /* const [page, setPage] = useState(activePage || 1);*/
72
72
const [ passedItems , setPassedItems ] = useState ( items || [ ] ) ;
73
73
74
74
// functions
@@ -270,26 +270,22 @@ const CDataTable = props=>{
270
270
setPerPageItems ( itemsPerPage ) ;
271
271
} , [ itemsPerPage ] ) ;
272
272
273
- //sorterValue
274
- /*
273
+ //sorterValue ?
275
274
useMemo ( ( ) => {
276
275
const asc = sorterValue . asc === false ? false : true ;
277
276
setSorterState ( Object . assign ( { } , { asc, column : sorterValue . column } ) ) ;
278
277
} , [ sorterValue ] ) ;
279
- */
280
278
281
279
//tableFilterValue
282
280
useMemo ( ( ) => {
283
281
if ( compData . firstRun ) return ;
284
282
setTableFilterState ( tableFilterValue ) ;
285
283
} , [ tableFilterValue ] ) ;
286
284
287
- //columnFilterValue
288
- /*
285
+ //columnFilterValue ?
289
286
useMemo ( ( ) => {
290
287
setColumnFilterState ( Object . assign ( { } , columnFilterValue ) ) ;
291
288
} , [ columnFilterValue ] ) ;
292
- */
293
289
294
290
//items
295
291
useMemo ( ( ) => {
@@ -479,7 +475,7 @@ const CDataTable = props=>{
479
475
key = { 'details' + itemIndex }
480
476
>
481
477
< td
482
- colspan = { colspan }
478
+ colSpan = { colspan }
483
479
className = "p-0"
484
480
style = { { border :'none !important' } }
485
481
>
0 commit comments