|
|
|
@ -141,8 +141,22 @@ const onDuplicateRow = () => {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const onNext = async () => { |
|
|
|
|
if (changedColumns.value.size > 0) { |
|
|
|
|
await Modal.confirm({ |
|
|
|
|
title: 'Do you want to save the changes?', |
|
|
|
|
okText: 'Save', |
|
|
|
|
cancelText: 'Discard', |
|
|
|
|
onOk: async () => { |
|
|
|
|
await save() |
|
|
|
|
emits('next') |
|
|
|
|
}, |
|
|
|
|
onCancel: () => { |
|
|
|
|
emits('next') |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
emits('next') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const reloadParentRowHook = inject(ReloadRowDataHookInj, createEventHook()) |
|
|
|
@ -196,7 +210,7 @@ useActiveKeyupListener(
|
|
|
|
|
emits('prev') |
|
|
|
|
} else if (e.key === 'ArrowRight') { |
|
|
|
|
e.stopPropagation() |
|
|
|
|
emits('next') |
|
|
|
|
onNext() |
|
|
|
|
} |
|
|
|
|
// on alt + s save record |
|
|
|
|
else if (e.code === 'KeyS') { |
|
|
|
@ -319,7 +333,8 @@ export default {
|
|
|
|
|
:ref="i ? null : (el) => (cellWrapperEl = el)" |
|
|
|
|
class="!bg-white rounded px-1 min-h-[35px] flex items-center mt-2 relative" |
|
|
|
|
> |
|
|
|
|
<LazySmartsheetVirtualCell v-if="isVirtualCol(col)" v-model="row.row[col.title]" :row="row" :column="col" /> |
|
|
|
|
<LazySmartsheetVirtualCell v-if="isVirtualCol(col)" v-model="row.row[col.title]" :row="row" |
|
|
|
|
:column="col" /> |
|
|
|
|
|
|
|
|
|
<LazySmartsheetCell |
|
|
|
|
v-else |
|
|
|
|