File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ export default function useCelResize(
5252 const offset = event . pageX - startPageX . current ;
5353 const oldWidth = colsWidthsRef . current . get ( columnKey ) ;
5454 let newWidth = startRealWidth . current + ( isFixRight ? - offset : offset ) ;
55- const index = colsKeys . findIndex ( key => key === columnKey ) ;
5655
5756 const minWidth = typeof resizable === 'object' ? resizable . minWidth || 0 : 0 ;
5857 if ( newWidth < minWidth ) {
@@ -71,6 +70,7 @@ export default function useCelResize(
7170 let addWidthColumnKey : React . Key ;
7271 const isDecreasingWidth = oldWidth - newWidth > 0 ;
7372 if ( smallThanWidth > 0 && isDecreasingWidth ) {
73+ const index = colsKeys . findIndex ( key => key === columnKey ) ;
7474 addWidthColumnKey = colsKeys [ index + 1 ] ?? colsKeys [ index - 1 ] ;
7575 }
7676
You can’t perform that action at this time.
0 commit comments