diff --git a/packages/nc-gui/components/virtual-cell/Lookup.vue b/packages/nc-gui/components/virtual-cell/Lookup.vue index b358296361..02201a6769 100644 --- a/packages/nc-gui/components/virtual-cell/Lookup.vue +++ b/packages/nc-gui/components/virtual-cell/Lookup.vue @@ -12,8 +12,8 @@ import { isAttachment, provide, ref, - refAutoReset, useMetas, + useShowNotEditableWarning, watch, } from '#imports' @@ -75,26 +75,13 @@ provide(MetaInj, lookupTableMeta) provide(CellUrlDisableOverlayInj, ref(true)) -const timeout = 3000 // in ms - -const showEditWarning = refAutoReset(false, timeout) - -const showClearWarning = refAutoReset(false, timeout) - -useSelectedCellKeyupListener(inject(ActiveCellInj, ref(false)), (e: KeyboardEvent) => { - switch (e.key) { - case 'Enter': - showEditWarning.value = true - break - default: - showClearWarning.value = true - } -}) +const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning, activateShowEditNonEditableFieldWarning } = + useShowNotEditableWarning()