Browse Source

fix: add select selected event for Infinite table

pull/9799/head
DarkPhoenix2704 2 weeks ago
parent
commit
579059f5c3
  1. 10
      packages/nc-gui/components/smartsheet/grid/InfiniteTable.vue

10
packages/nc-gui/components/smartsheet/grid/InfiniteTable.vue

@ -1400,14 +1400,14 @@ eventBus.on(async (event, payload) => {
}) })
watch(activeCell, (activeCell) => { watch(activeCell, (activeCell) => {
const row = activeCell.row !== null ? cachedRows.value.get(activeCell.row)?.row : undefined; const row = activeCell.row !== null ? cachedRows.value.get(activeCell.row)?.row : undefined
const col = (row && activeCell.col !== null) ? fields.value[activeCell.col] : undefined; const col = row && activeCell.col !== null ? fields.value[activeCell.col] : undefined
const val = (row && col) ? row[col.title as string] : undefined; const val = row && col ? row[col.title as string] : undefined
const rowId = extractPkFromRow(row!, meta.value?.columns as ColumnType[]) const rowId = extractPkFromRow(row!, meta.value?.columns as ColumnType[])
const viewId = view.value?.id; const viewId = view.value?.id
eventBus.emit(SmartsheetStoreEvents.CELL_SELECTED, { rowId, colId: col?.id, val, viewId }); eventBus.emit(SmartsheetStoreEvents.CELL_SELECTED, { rowId, colId: col?.id, val, viewId })
}) })
const reloadViewDataHookHandler = async () => { const reloadViewDataHookHandler = async () => {

Loading…
Cancel
Save