Browse Source

fix: check value is defined or not

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5665/head
Pranav C 1 year ago
parent
commit
8d2b551bf4
  1. 2
      packages/nc-gui/components/cell/SingleSelect.vue

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

@ -97,7 +97,7 @@ const editAllowed = computed(() => (hasEditRoles.value || isForm.value) && (acti
const vModel = computed({
get: () => tempSelectedOptState.value ?? modelValue,
set: (val) => {
if (isNewOptionCreateEnabled.value && (options.value ?? []).every((op) => op.title !== val)) {
if (val && isNewOptionCreateEnabled.value && (options.value ?? []).every((op) => op.title !== val)) {
tempSelectedOptState.value = val
return addIfMissingAndSave()
}

Loading…
Cancel
Save