diff --git a/packages/nc-gui/components/cell/GeoData.vue b/packages/nc-gui/components/cell/GeoData.vue index 6d465a6e8f..436e8c585f 100644 --- a/packages/nc-gui/components/cell/GeoData.vue +++ b/packages/nc-gui/components/cell/GeoData.vue @@ -20,6 +20,10 @@ const vModel = useVModel(props, 'modelValue', emits) const activeCell = inject(ActiveCellInj, ref(false)) +const isPublic = inject(IsPublicInj, ref(false)) + +const readonly = inject(ReadonlyInj, ref(false)) + const isExpanded = ref(false) const isLoading = ref(false) @@ -167,19 +171,39 @@ watch( } }, ) + +const handleKeyDown = (e: KeyboardEvent) => { + if (e.key === 'Escape' && isExpanded.value) { + e.preventDefault() + e.stopImmediatePropagation() + isExpanded.value = false + } + + if (e.key === 'Enter') { + e.preventDefault() + isExpanded.value = !isExpanded.value + } +}