Browse Source

fix(gui): single select cell related bugs

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4957/head
Pranav C 2 years ago
parent
commit
887269d5c1
  1. 7
      packages/nc-gui/components/cell/SingleSelect.vue
  2. 2
      packages/nc-gui/composables/useProject.ts

7
packages/nc-gui/components/cell/SingleSelect.vue

@ -192,6 +192,7 @@ const toggleMenu = (e: Event) => {
</script>
<template>
<div class="h-full w-full flex items-center" @click="toggleMenu">
<a-select
ref="aselect"
v-model:value="vModel"
@ -199,15 +200,14 @@ const toggleMenu = (e: Event) => {
:class="{ 'caret-transparent': !hasEditRoles }"
:allow-clear="!column.rqd && editAllowed"
:bordered="false"
:open="isOpen"
:open="isOpen && (active || editable)"
:disabled="readOnly"
:show-arrow="hasEditRoles && !readOnly && (editable || (active && vModel === null))"
:dropdown-class-name="`nc-dropdown-single-select-cell ${isOpen ? 'active' : ''}`"
show-search
:show-search="isOpen && (active || editable)"
@select="isOpen = false"
@keydown.stop
@search="search"
@click="toggleMenu"
>
<a-select-option
v-for="op of options"
@ -243,6 +243,7 @@ const toggleMenu = (e: Event) => {
</div>
</a-select-option>
</a-select>
</div>
</template>
<style scoped lang="scss">

2
packages/nc-gui/composables/useProject.ts

@ -1,7 +1,6 @@
import type { BaseType, OracleUi, ProjectType, TableType } from 'nocodb-sdk'
import { SqlUiFactory } from 'nocodb-sdk'
import { isString } from '@vueuse/core'
import { useRoute } from 'vue-router'
import {
ClientType,
computed,
@ -12,6 +11,7 @@ import {
useInjectionState,
useNuxtApp,
useRoles,
useRoute,
useRouter,
useTheme,
} from '#imports'

Loading…
Cancel
Save