@@ -3,9 +3,10 @@ import PropTypes from 'prop-types'
3
3
import classNames from 'classnames'
4
4
import CPagination from '../pagination/CPagination'
5
5
import CElementCover from '../element-cover/CElementCover'
6
- import style from './CDataTable.module.css'
7
6
import CIcon from '@coreui/icons-react'
8
7
import { cilArrowTop , cilBan , cilFilterX } from '@coreui/icons'
8
+ import style from './CDataTable.module.css'
9
+ import './CDataTable.css'
9
10
10
11
//component - CoreUI / CTable
11
12
const CDataTable = props => {
@@ -343,7 +344,7 @@ const CDataTable = props => {
343
344
344
345
const cleanerProps = {
345
346
content : cilFilterX ,
346
- className : `ml -2 ${ isFiltered ? 'text-danger' : 'transparent' } ` ,
347
+ className : `mfs -2 ${ isFiltered ? 'text-danger' : 'transparent' } ` ,
347
348
role : isFiltered ? 'button' : null ,
348
349
tabIndex : isFiltered ? 0 : null ,
349
350
}
@@ -414,11 +415,11 @@ const CDataTable = props => {
414
415
< div className = "row my-2 mx-0" >
415
416
{
416
417
( tableFilter || cleaner ) &&
417
- < div className = "col-sm-6 form-inline p-0" >
418
+ < div className = "col-sm-6 form-inline p-0 c-datatable-filter " >
418
419
{
419
420
tableFilter &&
420
421
< >
421
- < label className = "mr -2" > { tableFilterData . label } </ label >
422
+ < label className = "mfe -2" > { tableFilterData . label } </ label >
422
423
< input
423
424
className = "form-control"
424
425
type = "text"
@@ -436,6 +437,7 @@ const CDataTable = props => {
436
437
< CIcon
437
438
{ ...cleanerProps }
438
439
onClick = { clean }
440
+ onKeyUp = { ( event ) => { if ( event . key === 'Enter' ) clean ( ) } }
439
441
/>
440
442
)
441
443
}
@@ -444,9 +446,9 @@ const CDataTable = props => {
444
446
}
445
447
{
446
448
itemsPerPageSelect &&
447
- < div className = { ' col-sm-6 p-0 ' + ( ! ( tableFilter || cleaner ) && ' offset-sm-6') } >
448
- < div className = "form-inline justify-content-sm-end" >
449
- < label className = "mr -2" > { paginationSelect . label } </ label >
449
+ < div className = { ` col-sm-6 p-0 ${ ( tableFilter || cleaner ) ? '' : ' offset-sm-6'} ` } >
450
+ < div className = "form-inline justify-content-sm-end c-datatable-items-per-page " >
451
+ < label className = "mfe -2" > { paginationSelect . label } </ label >
450
452
< select
451
453
className = "form-control"
452
454
onChange = { paginationChange }
0 commit comments