diff --git a/packages/nc-gui/components/cell/attachment/index.vue b/packages/nc-gui/components/cell/attachment/index.vue index b8d7a271d9..1ce6ec6a51 100644 --- a/packages/nc-gui/components/cell/attachment/index.vue +++ b/packages/nc-gui/components/cell/attachment/index.vue @@ -123,37 +123,36 @@ watch( } } }, - { - immediate: true - } - , - ) + { + immediate: true, + }, +) - /** updates attachments array for autosave */ - function updateModelValue(data: string | Record[]) { - emits('update:modelValue', data) - } +/** updates attachments array for autosave */ +function updateModelValue(data: string | Record[]) { + emits('update:modelValue', data) +} - /** Close modal on escape press, disable dropzone as well */ - onKeyDown('Escape', () => { - modalVisible.value = false - isOverDropZone.value = false - }) - - /** sync storedFiles state with row state */ - watch( - () => storedFiles.value.length || 0, - () => { - rowState.value[column.value!.title!] = storedFiles.value - }, - ) - - useSelectedCellKeyupListener(inject(ActiveCellInj, ref(false)), (e) => { - if (e.key === 'Enter' && !isReadonly.value) { - e.stopPropagation() - modalVisible.value = true - } - }) +/** Close modal on escape press, disable dropzone as well */ +onKeyDown('Escape', () => { + modalVisible.value = false + isOverDropZone.value = false +}) + +/** sync storedFiles state with row state */ +watch( + () => storedFiles.value.length || 0, + () => { + rowState.value[column.value!.title!] = storedFiles.value + }, +) + +useSelectedCellKeyupListener(inject(ActiveCellInj, ref(false)), (e) => { + if (e.key === 'Enter' && !isReadonly.value) { + e.stopPropagation() + modalVisible.value = true + } +})