Browse Source

fix(gui): block only required column remove event

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4311/head
Pranav C 2 years ago
parent
commit
72d4eb2aed
  1. 7
      packages/nc-gui/components/smartsheet/Form.vue

7
packages/nc-gui/components/smartsheet/Form.vue

@ -170,15 +170,14 @@ function onMoveCallback(event: any) {
function onMove(event: any) { function onMove(event: any) {
const { newIndex, element, oldIndex } = event.added || event.moved || event.removed const { newIndex, element, oldIndex } = event.added || event.moved || event.removed
if (shouldSkipColumn(element)) {
return
}
if (event.added) { if (event.added) {
element.show = true element.show = true
} }
if (event.removed) { if (event.removed) {
if (shouldSkipColumn(element)) {
return
}
element.show = false element.show = false
saveOrUpdate(element, oldIndex) saveOrUpdate(element, oldIndex)
} else { } else {

Loading…
Cancel
Save