Browse Source

fix(nc-gui): new select options doesn't get saved on duplicate

pull/6820/head
DarkPhoenix2704 1 year ago
parent
commit
f8ec82dac6
  1. 13
      packages/nc-gui/components/smartsheet/column/SelectOptions.vue

13
packages/nc-gui/components/smartsheet/column/SelectOptions.vue

@ -120,12 +120,6 @@ onMounted(() => {
}
})
const optionChanged = (changedId: string) => {
if (changedId && changedId === defaultOption.value?.id) {
vModel.value.cdf = defaultOption.value.title
}
}
const getNextColor = () => {
let tempColor = colors.value[0]
if (options.value.length && options.value[options.value.length - 1].color) {
@ -191,6 +185,13 @@ const removeRenderedOption = (index: number) => {
}
}
const optionChanged = (changedId: string) => {
if (changedId && changedId === defaultOption.value?.id) {
vModel.value.cdf = defaultOption.value.title
}
syncOptions()
}
const undoRemoveRenderedOption = (index: number) => {
renderedOptions.value[index].status = undefined
syncOptions()

Loading…
Cancel
Save