@@ -16,39 +16,34 @@ const NetflowTableRow: React.FC<{
1616 onSelect : ( record ?: Record ) => void ;
1717 highlight : boolean ;
1818 height ?: number ;
19+ showContent ?: boolean ;
1920 tableWidth : number ;
20- } > = ( { flow, selectedRecord, columns, size, onSelect, highlight, height, tableWidth } ) => {
21+ } > = ( { flow, selectedRecord, columns, size, onSelect, highlight, height, showContent , tableWidth } ) => {
2122 const onRowClick = ( ) => {
2223 onSelect ( flow ) ;
2324 } ;
2425
25- const shouldHighlight = React . useRef ( highlight ) ;
26-
2726 return (
28- < Tr
29- data-test = { `tr-${ flow . key } ` }
30- isRowSelected = { flow . key === selectedRecord ?. key }
31- onRowClick = { onRowClick }
32- className = { `${ isDark ( ) ? 'dark' : 'light' } -stripped` }
33- >
34- { columns . map ( c => (
35- < CSSTransition
36- key = { c . id }
37- in = { shouldHighlight . current }
38- appear = { shouldHighlight . current }
39- timeout = { 100 }
40- classNames = "newflow"
41- >
42- < Td
43- data-test = { `td-${ flow . key } ` }
44- key = { c . id }
45- style = { { height, width : `${ Math . floor ( ( 100 * c . width ) / tableWidth ) } %` } }
46- >
47- { < RecordField flow = { flow } column = { c } size = { size } > </ RecordField > }
48- </ Td >
49- </ CSSTransition >
50- ) ) }
51- </ Tr >
27+ < CSSTransition in = { highlight } appear = { highlight } timeout = { 100 } classNames = "newflow" >
28+ < Tr
29+ data-test = { `tr-${ flow . key } ` }
30+ isRowSelected = { flow . key === selectedRecord ?. key }
31+ onRowClick = { onRowClick }
32+ className = { `${ isDark ( ) ? 'dark' : 'light' } -stripped` }
33+ style = { { height } }
34+ >
35+ { showContent &&
36+ columns . map ( c => (
37+ < Td
38+ data-test = { `td-${ flow . key } ` }
39+ key = { c . id }
40+ style = { { height : '100%' , width : `${ Math . floor ( ( 100 * c . width ) / tableWidth ) } %` } }
41+ >
42+ { < RecordField flow = { flow } column = { c } size = { size } > </ RecordField > }
43+ </ Td >
44+ ) ) }
45+ </ Tr >
46+ </ CSSTransition >
5247 ) ;
5348} ;
5449
0 commit comments