diff --git a/packages/nc-gui/components/virtual-cell/components/ItemChip.vue b/packages/nc-gui/components/virtual-cell/components/ItemChip.vue index a1afc98d60..232271dfaa 100644 --- a/packages/nc-gui/components/virtual-cell/components/ItemChip.vue +++ b/packages/nc-gui/components/virtual-cell/components/ItemChip.vue @@ -19,9 +19,10 @@ interface Props { column: any showUnlinkButton: boolean border?: boolean + readonly?: boolean } -const { value, item, column, showUnlinkButton, border = true } = defineProps() +const { value, item, column, showUnlinkButton, border = true, readonly: readonlyProp } = defineProps() const emit = defineEmits(['unlink']) @@ -40,7 +41,7 @@ const isLocked = inject(IsLockedInj, ref(false)) const { open } = useExpandedFormDetached() function openExpandedForm() { - if (!readOnly.value && !isLocked.value) { + if (!readOnly.value && !isLocked.value && !readonlyProp) { open({ isOpen: true, row: { row: item, rowMeta: {}, oldRow: { ...item } }, diff --git a/packages/nc-gui/components/virtual-cell/components/ListItems.vue b/packages/nc-gui/components/virtual-cell/components/ListItems.vue index bd9d4ba6c6..20966329a5 100644 --- a/packages/nc-gui/components/virtual-cell/components/ListItems.vue +++ b/packages/nc-gui/components/virtual-cell/components/ListItems.vue @@ -234,6 +234,7 @@ watch(vModel, (nextVal) => { :column="props.column" :show-unlink-button="false" :border="false" + readonly />