File tree 2 files changed +9
-0
lines changed
packages/main/src/components/AnalyticalTable
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ export const useWindowResize = () => {
12
12
13
13
const observer = useRef ( new MutationObserver ( onWindowResize ) ) ;
14
14
15
+ useEffect ( ( ) => {
16
+ if ( headerRef . current && headerRef . current . getBoundingClientRect ( ) . width !== 0 ) {
17
+ setTableWidth ( headerRef . current . getBoundingClientRect ( ) . width ) ;
18
+ }
19
+ } , [ headerRef . current , setTableWidth ] ) ;
20
+
15
21
useEffect ( ( ) => {
16
22
Device . resize . attachHandler ( onWindowResize , null ) ;
17
23
return ( ) => {
Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ export const VirtualTableBody = (props) => {
47
47
if ( resizedColumns . hasOwnProperty ( item . accessor ) ) {
48
48
return resizedColumns [ item . accessor ] ;
49
49
}
50
+ if ( item . hasOwnProperty ( 'show' ) && ! item . show ) {
51
+ return 0 ;
52
+ }
50
53
return item . minWidth ? item . minWidth : DEFAULT_COLUMN_WIDTH ;
51
54
} )
52
55
. reduce ( ( acc , val ) => acc + val , 0 ) ;
You can’t perform that action at this time.
0 commit comments