File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
x-pack/plugins/data_visualizer/public/application/common/components/stats_table Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,8 @@ $panelWidthL: #{'max(40%, 450px)'};
3131 }
3232
3333 .euiTableRow > .euiTableRowCell {
34- border-bottom : 0 ;
35- border-top : $euiBorderThin ;
36-
34+ border-top : 0 ;
35+ border-bottom : $euiBorderThin ;
3736 }
3837
3938 .euiTableCellContent {
Original file line number Diff line number Diff line change @@ -20,10 +20,12 @@ import {
2020 RIGHT_ALIGNMENT ,
2121 EuiResizeObserver ,
2222 EuiLoadingSpinner ,
23+ useEuiTheme ,
2324} from '@elastic/eui' ;
2425import { i18n } from '@kbn/i18n' ;
2526import { EuiTableComputedColumnType } from '@elastic/eui/src/components/basic_table/table_types' ;
2627import { throttle } from 'lodash' ;
28+ import { css } from '@emotion/react' ;
2729import { JOB_FIELD_TYPES } from '../../../../../common/constants' ;
2830import type { JobFieldType , DataVisualizerTableState } from '../../../../../common/types' ;
2931import { DocumentStat } from './components/field_data_row/document_stats' ;
@@ -70,6 +72,8 @@ export const DataVisualizerTable = <T extends DataVisualizerTableItem>({
7072 onChange,
7173 loading,
7274} : DataVisualizerTableProps < T > ) => {
75+ const { euiTheme } = useEuiTheme ( ) ;
76+
7377 const [ expandedRowItemIds , setExpandedRowItemIds ] = useState < string [ ] > ( [ ] ) ;
7478 const [ expandAll , setExpandAll ] = useState < boolean > ( false ) ;
7579
@@ -361,6 +365,18 @@ export const DataVisualizerTable = <T extends DataVisualizerTableItem>({
361365 rowProps = { ( item ) => ( {
362366 'data-test-subj' : `dataVisualizerRow row-${ item . fieldName } ` ,
363367 } ) }
368+ css = { css `
369+ thead {
370+ position : sticky;
371+ inset-block-start : 0 ;
372+ z-index : 1 ;
373+ background-color : ${ euiTheme . colors . emptyShade } ;
374+ box-shadow : inset 0 0px 0 , inset 0 -1px 0 ${ euiTheme . border . color } ;
375+ }
376+ .euiTableRow > .euiTableRowCel {
377+ border-top : 0px ;
378+ }
379+ ` }
364380 />
365381 </ div >
366382 ) }
You can’t perform that action at this time.
0 commit comments