File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1742,27 +1742,27 @@ export default {
17421742 const { callback } = contextmenuBodyOption ;
17431743
17441744 if ( ! isEmptyValue ( rowKey ) && ! isEmptyValue ( colKey ) ) {
1745- const tableIndex = allRowKeys . findIndex ( ( x ) => x === rowKey ) ;
1745+ const rowIndex = allRowKeys . findIndex ( ( x ) => x === rowKey ) ;
17461746
17471747 // insert row above
17481748 if ( CONTEXTMENU_TYPES . INSERT_ROW_ABOVE === type ) {
17491749 tableData . splice (
1750- tableIndex ,
1750+ rowIndex ,
17511751 0 ,
17521752 createEmptyRowData ( { colgroups, rowKeyFieldName } ) ,
17531753 ) ;
17541754 }
17551755 // insert row below
17561756 else if ( CONTEXTMENU_TYPES . INSERT_ROW_BELOW === type ) {
17571757 tableData . splice (
1758- tableIndex + 1 ,
1758+ rowIndex + 1 ,
17591759 0 ,
17601760 createEmptyRowData ( { colgroups, rowKeyFieldName } ) ,
17611761 ) ;
17621762 }
17631763 // remove row
17641764 else if ( CONTEXTMENU_TYPES . REMOVE_ROW === type ) {
1765- tableData . splice ( tableIndex , 1 ) ;
1765+ tableData . splice ( rowIndex , 1 ) ;
17661766 }
17671767 // hide column
17681768 else if ( CONTEXTMENU_TYPES . HIDE_COLUMN === type ) {
You can’t perform that action at this time.
0 commit comments