Browse Source

fix(nc-gui): Added lazy rendering in selection option column

pull/6569/head
Muhammed Mustafa 1 year ago
parent
commit
b103534622
  1. 20
      packages/nc-gui/components/smartsheet/column/SelectOptions.vue

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

@ -133,8 +133,16 @@ const addNewOption = () => {
title: '',
color: getNextColor(),
}
renderedOptions.value.push(tempOption)
options.value.push(tempOption)
loadedOptionCount.value = options.value.length
renderedOptions.value = [...options.value]
nextTick(() => {
if (inputs.value?.$el) {
inputs.value.$el.focus()
}
})
}
// const optionsMagic = async () => {
@ -174,11 +182,11 @@ const undoRemoveRenderedOption = (index: number) => {
}
// focus last created input
watch(inputs, () => {
if (inputs.value?.$el) {
inputs.value.$el.focus()
}
})
// watch(inputs, () => {
// if (inputs.value?.$el) {
// inputs.value.$el.focus()
// }
// })
// Removes the Select Option from cdf if the option is removed
watch(vModel.value, (next) => {

Loading…
Cancel
Save