diff --git a/packages/nc-gui/components/smartsheet/Grid.vue b/packages/nc-gui/components/smartsheet/Grid.vue index bfc8996870..07b213120b 100644 --- a/packages/nc-gui/components/smartsheet/Grid.vue +++ b/packages/nc-gui/components/smartsheet/Grid.vue @@ -124,6 +124,7 @@ const { removeRowIfNew, navigateToSiblingRow, getExpandedRowIndex, + deleteRangeOfRows, } = useViewData(meta, view, xWhere) const { getMeta } = useMetas() @@ -199,6 +200,7 @@ const { isCellActive, tbodyEl, resetSelectedRange, + selectedRange, } = useMultiSelect( meta, fields, @@ -794,6 +796,14 @@ const confirmDeleteRow = (row: number) => { }, }) } + +const deleteSelectedRangeOfRows = () => { + deleteRangeOfRows(selectedRange).then(() => { + clearSelectedRange() + activeCell.row = null + activeCell.col = null + }) +}