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(
63
63
// If there is no column on the right, it will be allocated to the column on the left.
64
64
let addWidthColumnKey : React . Key ;
65
65
const isDecreasingWidth = oldWidth - newWidth > 0 ;
66
+ console . log ( 'smallThanWidth' , smallThanWidth ) ;
66
67
if ( smallThanWidth > 0 && isDecreasingWidth ) {
67
68
const index = colsKeys . findIndex ( key => key === columnKey ) ;
68
69
addWidthColumnKey = colsKeys [ index + 1 ] ?? colsKeys [ index - 1 ] ;
@@ -71,7 +72,7 @@ export default function useCelResize(
71
72
const columnWidthsMap = new Map ( colsWidths ) ;
72
73
columnWidthsMap . set ( columnKey , newWidth ) ;
73
74
if ( addWidthColumnKey ) {
74
- const addWidthColumnNewWidth = colsWidths . get ( addWidthColumnKey ) + ( oldWidth - newWidth ) ;
75
+ const addWidthColumnNewWidth = colsWidths . get ( addWidthColumnKey ) + smallThanWidth ;
75
76
columnWidthsMap . set ( addWidthColumnKey , addWidthColumnNewWidth ) ;
76
77
}
77
78
const columnWidths = Array . from ( columnWidthsMap ) . map ( ( [ key , width ] ) => ( {
You can’t perform that action at this time.
0 commit comments