|
|
@ -178,7 +178,7 @@ const addNewRow = () => { |
|
|
|
rowMeta: { new: true }, |
|
|
|
rowMeta: { new: true }, |
|
|
|
} |
|
|
|
} |
|
|
|
isExpanded.value = true |
|
|
|
isExpanded.value = true |
|
|
|
}, 500); |
|
|
|
}, 500) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// attach keyboard listeners to switch between rows |
|
|
|
// attach keyboard listeners to switch between rows |
|
|
@ -200,7 +200,7 @@ useActiveKeyupListener( |
|
|
|
document.activeElement?.blur() |
|
|
|
document.activeElement?.blur() |
|
|
|
|
|
|
|
|
|
|
|
e.stopPropagation() |
|
|
|
e.stopPropagation() |
|
|
|
e.preventDefault() |
|
|
|
|
|
|
|
if (isNew.value) { |
|
|
|
if (isNew.value) { |
|
|
|
const data = await save(rowState.value) |
|
|
|
const data = await save(rowState.value) |
|
|
|
await syncLTARRefs(data) |
|
|
|
await syncLTARRefs(data) |
|
|
@ -214,12 +214,8 @@ useActiveKeyupListener( |
|
|
|
} |
|
|
|
} |
|
|
|
// on alt + n create new record |
|
|
|
// on alt + n create new record |
|
|
|
} else if (e.code === 'KeyN') { |
|
|
|
} else if (e.code === 'KeyN') { |
|
|
|
|
|
|
|
// remove focus from the active input if any to avoid unwanted input |
|
|
|
// remove focus from the active input if any |
|
|
|
;(document.activeElement as HTMLInputElement)?.blur?.() |
|
|
|
document.activeElement?.blur() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e.stopPropagation() |
|
|
|
|
|
|
|
e.preventDefault() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (changedColumns.value.size > 0) { |
|
|
|
if (changedColumns.value.size > 0) { |
|
|
|
await Modal.confirm({ |
|
|
|
await Modal.confirm({ |
|
|
@ -253,7 +249,6 @@ useActiveKeyupListener( |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
addNewRow() |
|
|
|
addNewRow() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ immediate: true }, |
|
|
|
{ immediate: true }, |
|
|
@ -282,7 +277,7 @@ export default { |
|
|
|
<div class="flex h-full nc-form-wrapper items-stretch min-h-[max(70vh,100%)]"> |
|
|
|
<div class="flex h-full nc-form-wrapper items-stretch min-h-[max(70vh,100%)]"> |
|
|
|
<div class="flex-1 overflow-auto scrollbar-thin-dull nc-form-fields-container relative"> |
|
|
|
<div class="flex-1 overflow-auto scrollbar-thin-dull nc-form-fields-container relative"> |
|
|
|
<template v-if="props.showNextPrevIcons"> |
|
|
|
<template v-if="props.showNextPrevIcons"> |
|
|
|
<a-tooltip placement="bottom" v-if="!props.firstRow"> |
|
|
|
<a-tooltip v-if="!props.firstRow" placement="bottom"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('labels.prevRow') }} |
|
|
|
{{ $t('labels.prevRow') }} |
|
|
|
|
|
|
|
|
|
|
@ -291,7 +286,7 @@ export default { |
|
|
|
<MdiChevronRight class="cursor-pointer nc-next-arrow" @click="$emit('next')" /> |
|
|
|
<MdiChevronRight class="cursor-pointer nc-next-arrow" @click="$emit('next')" /> |
|
|
|
</a-tooltip> |
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
<a-tooltip placement="bottom" v-if="!props.lastRow"> |
|
|
|
<a-tooltip v-if="!props.lastRow" placement="bottom"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('labels.nextRow') }} |
|
|
|
{{ $t('labels.nextRow') }} |
|
|
|
<GeneralShortcutLabel class="justify-center" :keys="['Alt', '→']" /> |
|
|
|
<GeneralShortcutLabel class="justify-center" :keys="['Alt', '→']" /> |
|
|
@ -320,8 +315,7 @@ export default { |
|
|
|
:ref="i ? null : (el) => (cellWrapperEl = el)" |
|
|
|
:ref="i ? null : (el) => (cellWrapperEl = el)" |
|
|
|
class="!bg-white rounded px-1 min-h-[35px] flex items-center mt-2 relative" |
|
|
|
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" |
|
|
|
<LazySmartsheetVirtualCell v-if="isVirtualCol(col)" v-model="row.row[col.title]" :row="row" :column="col" /> |
|
|
|
:column="col" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<LazySmartsheetCell |
|
|
|
<LazySmartsheetCell |
|
|
|
v-else |
|
|
|
v-else |
|
|
|