diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index e01fd5541d..4bea41e466 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -7,6 +7,7 @@ import { ActiveCellInj, ColumnInj, EditModeInj, + IsFormInj, IsKanbanInj, ReadonlyInj, computed, @@ -44,6 +45,8 @@ const isKanban = inject(IsKanbanInj, ref(false)) const isPublic = inject(IsPublicInj, ref(false)) +const isForm = inject(IsFormInj, ref(false)) + const { $api } = useNuxtApp() const searchVal = ref() @@ -78,7 +81,7 @@ const isOptionMissing = computed(() => { const hasEditRoles = computed(() => hasRole('owner', true) || hasRole('creator', true) || hasRole('editor', true)) -const editAllowed = computed(() => hasEditRoles.value && (active.value || editable.value)) +const editAllowed = computed(() => (hasEditRoles.value || isForm.value) && (active.value || editable.value)) const vModel = computed({ get: () => tempSelectedOptState.value ?? modelValue, @@ -199,10 +202,14 @@ const onKeydown = (e: KeyboardEvent) => { e.stopPropagation() } } + +const onSelect = () => { + isOpen.value = false +}