File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
packages/main/src/components/AnalyticalTable Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ export const useWindowResize = () => {
1212
1313 const observer = useRef ( new MutationObserver ( onWindowResize ) ) ;
1414
15+ useEffect ( ( ) => {
16+ if ( headerRef . current && headerRef . current . getBoundingClientRect ( ) . width !== 0 ) {
17+ setTableWidth ( headerRef . current . getBoundingClientRect ( ) . width ) ;
18+ }
19+ } , [ headerRef . current , setTableWidth ] ) ;
20+
1521 useEffect ( ( ) => {
1622 Device . resize . attachHandler ( onWindowResize , null ) ;
1723 return ( ) => {
Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ export const VirtualTableBody = (props) => {
4747 if ( resizedColumns . hasOwnProperty ( item . accessor ) ) {
4848 return resizedColumns [ item . accessor ] ;
4949 }
50+ if ( item . hasOwnProperty ( 'show' ) && ! item . show ) {
51+ return 0 ;
52+ }
5053 return item . minWidth ? item . minWidth : DEFAULT_COLUMN_WIDTH ;
5154 } )
5255 . reduce ( ( acc , val ) => acc + val , 0 ) ;
You can’t perform that action at this time.
0 commit comments