File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,15 @@ export const DataTableResizableHeaderHandle = (props: DataTableResizableHeaderHa
3838
3939 columnRef . current . style . width = widthString ;
4040
41+ // Get the next th (if it exists)
42+ const nextColumnElement = columnRef . current . nextElementSibling as HTMLTableCellElement | null ;
43+
44+ if ( nextColumnElement ) {
45+ const nextColumnWidth = nextColumnElement . getBoundingClientRect ( ) . width - delta ;
46+ const nextColumnWidthString = `${ nextColumnWidth } px` ;
47+ nextColumnElement . style . width = nextColumnWidthString ;
48+ }
49+
4150 // we have to set (store) the width in the context and in the
4251 // local storage, otherwise the resizing won't work for small sizes
4352 setColumnWidth ( accessor , columnRef . current . style . width as string ) ;
You can’t perform that action at this time.
0 commit comments