Browse Source

fix: don't show expand when showing overwrite

nc-expand-rows
DarkPhoenix2704 2 months ago
parent
commit
39424fd10a
  1. 9
      packages/nc-gui/composables/useMultiSelect/index.ts

9
packages/nc-gui/composables/useMultiSelect/index.ts

@ -856,16 +856,13 @@ export function useMultiSelect(
const totalRowsBeforeActiveCell = (page - 1) * pageSize + activeCell.row const totalRowsBeforeActiveCell = (page - 1) * pageSize + activeCell.row
const availableRowsToUpdate = Math.max(0, totalRows - totalRowsBeforeActiveCell) 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 unreffedData = unref(data).slice(activeCell.row, activeCell.row + selectionRowCount)
const rowsInCurrentPage = unref(data).length const rowsInCurrentPage = unref(data).length
const recordsUpdatedInCurrentPage = Math.min( const recordsUpdatedInCurrentPage = Math.min(selectionRowCount, rowsInCurrentPage - activeCell.row)
Math.min(selectionRowCount, rowsInCurrentPage - activeCell.row), const recordsUpdatedInSubsequentPages = Math.max(0, availableRowsToUpdate - recordsUpdatedInCurrentPage)
availableRowsToUpdate,
)
const recordsUpdatedInSubsequentPages = Math.max(0, selectionRowCount - recordsUpdatedInCurrentPage)
let options = { let options = {
continue: false, continue: false,

Loading…
Cancel
Save