Browse Source

fix(gui): on removing attachment from model remove it from selected items array as well

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4931/head
Pranav C 2 years ago
parent
commit
33c35d9e5a
  1. 2
      packages/nc-gui/components/cell/attachment/utils.ts

2
packages/nc-gui/components/cell/attachment/utils.ts

@ -81,10 +81,12 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
if (isPublic.value) {
storedFiles.value.splice(i, 1)
attachments.value.splice(i, 1)
selectedVisibleItems.value.splice(i, 1)
updateModelValue(storedFiles.value)
} else {
attachments.value.splice(i, 1)
selectedVisibleItems.value.splice(i, 1)
updateModelValue(JSON.stringify(attachments.value))
}

Loading…
Cancel
Save