Browse Source

Merge pull request #9906 from nocodb/nc-select-col-issue

fix: data is missing when select option is added via cell
pull/9909/head
Anbarasu 1 month ago committed by GitHub
parent
commit
3001b7d7d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      packages/nc-gui/components/cell/MultiSelect.vue
  2. 6
      packages/nc-gui/components/cell/SingleSelect.vue

6
packages/nc-gui/components/cell/MultiSelect.vue

@ -275,15 +275,17 @@ async function addIfMissingAndSave() {
}
}
await $api.dbTableColumn.update(
const data = await $api.dbTableColumn.update(
(column.value as { fk_column_id?: string })?.fk_column_id || (column.value?.id as string),
updatedColMeta,
)
column.value.colOptions = data.columns.find((c) => c.id === column.value.id).colOptions
activeOptCreateInProgress.value--
if (!activeOptCreateInProgress.value) {
vModel.value = [...vModel.value]
// await getMeta(column.value.fk_model_id!, true)
tempSelectedOptsState.splice(0, tempSelectedOptsState.length)
}
} else {

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

@ -204,12 +204,14 @@ async function addIfMissingAndSave() {
}
}
await $api.dbTableColumn.update(
const data = await $api.dbTableColumn.update(
(column.value as { fk_column_id?: string })?.fk_column_id || (column.value?.id as string),
updatedColMeta,
)
column.value.colOptions = data.columns.find((c) => c.id === column.value.id).colOptions
vModel.value = newOptValue
await getMeta(column.value.fk_model_id!, true)
} catch (e: any) {
console.log(e)
message.error(await extractSdkResponseErrorMsg(e))

Loading…
Cancel
Save