File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ export default function useCelResize(
6363 // If there is no column on the right, it will be allocated to the column on the left.
6464 let addWidthColumnKey : React . Key ;
6565 const isDecreasingWidth = oldWidth - newWidth > 0 ;
66+ console . log ( 'smallThanWidth' , smallThanWidth ) ;
6667 if ( smallThanWidth > 0 && isDecreasingWidth ) {
6768 const index = colsKeys . findIndex ( key => key === columnKey ) ;
6869 addWidthColumnKey = colsKeys [ index + 1 ] ?? colsKeys [ index - 1 ] ;
@@ -71,7 +72,7 @@ export default function useCelResize(
7172 const columnWidthsMap = new Map ( colsWidths ) ;
7273 columnWidthsMap . set ( columnKey , newWidth ) ;
7374 if ( addWidthColumnKey ) {
74- const addWidthColumnNewWidth = colsWidths . get ( addWidthColumnKey ) + ( oldWidth - newWidth ) ;
75+ const addWidthColumnNewWidth = colsWidths . get ( addWidthColumnKey ) + smallThanWidth ;
7576 columnWidthsMap . set ( addWidthColumnKey , addWidthColumnNewWidth ) ;
7677 }
7778 const columnWidths = Array . from ( columnWidthsMap ) . map ( ( [ key , width ] ) => ( {
You can’t perform that action at this time.
0 commit comments