From 72172bf6cfcc0aebe72abf8f9a664c1ea8fca1ca Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Tue, 2 Aug 2022 23:51:56 +0200 Subject: [PATCH] feat(gui-v2): disable interaction on attachments for readonly state --- .../nc-gui-v2/components/cell/attachment/Modal.vue | 10 ++++++---- .../nc-gui-v2/components/cell/attachment/index.vue | 13 ++++++++++--- .../nc-gui-v2/components/cell/attachment/sort.ts | 3 ++- .../nc-gui-v2/components/cell/attachment/utils.ts | 5 ++++- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/packages/nc-gui-v2/components/cell/attachment/Modal.vue b/packages/nc-gui-v2/components/cell/attachment/Modal.vue index da5295b52f..da610af049 100644 --- a/packages/nc-gui-v2/components/cell/attachment/Modal.vue +++ b/packages/nc-gui-v2/components/cell/attachment/Modal.vue @@ -17,6 +17,7 @@ const { isLoading, isPublicGrid, isForm, + isReadonly, visibleItems, modalVisible, column, @@ -34,7 +35,7 @@ const dropZoneRef = ref() const sortableRef = ref() -const { dragging } = useSortable(sortableRef, visibleItems, updateModelValue) +const { dragging } = useSortable(sortableRef, visibleItems, updateModelValue, isReadonly) const { isOverDropZone } = useDropZone(dropZoneRef, onDrop) @@ -49,7 +50,7 @@ onKeyDown('Escape', () => {