From 39424fd10a0edcb59e24af0691e890054a0463a0 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Fri, 11 Oct 2024 16:17:48 +0000 Subject: [PATCH] fix: don't show expand when showing overwrite --- packages/nc-gui/composables/useMultiSelect/index.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/nc-gui/composables/useMultiSelect/index.ts b/packages/nc-gui/composables/useMultiSelect/index.ts index 7d777c461c..9816931d89 100644 --- a/packages/nc-gui/composables/useMultiSelect/index.ts +++ b/packages/nc-gui/composables/useMultiSelect/index.ts @@ -856,16 +856,13 @@ export function useMultiSelect( const totalRowsBeforeActiveCell = (page - 1) * pageSize + activeCell.row const availableRowsToUpdate = Math.max(0, totalRows - totalRowsBeforeActiveCell) - const rowsToAdd = Math.max(0, selectionRowCount - availableRowsToUpdate) + const rowsToAdd = Math.max(0, selectionRowCount - (totalRows - totalRowsBeforeActiveCell)) const unreffedData = unref(data).slice(activeCell.row, activeCell.row + selectionRowCount) const rowsInCurrentPage = unref(data).length - const recordsUpdatedInCurrentPage = Math.min( - Math.min(selectionRowCount, rowsInCurrentPage - activeCell.row), - availableRowsToUpdate, - ) - const recordsUpdatedInSubsequentPages = Math.max(0, selectionRowCount - recordsUpdatedInCurrentPage) + const recordsUpdatedInCurrentPage = Math.min(selectionRowCount, rowsInCurrentPage - activeCell.row) + const recordsUpdatedInSubsequentPages = Math.max(0, availableRowsToUpdate - recordsUpdatedInCurrentPage) let options = { continue: false,