Browse Source

fix: make chip component readonly in Listitem

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5848/head
Pranav C 1 year ago
parent
commit
e8ab7d2d06
  1. 5
      packages/nc-gui/components/virtual-cell/components/ItemChip.vue
  2. 1
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

5
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<Props>()
const { value, item, column, showUnlinkButton, border = true, readonly: readonlyProp } = defineProps<Props>()
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 } },

1
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
/>
<!-- <span class="hidden group-hover:(inline) text-gray-400 text-[11px] ml-1"> -->
<!-- ({{ $t('labels.primaryKey') }} : {{ getRelatedTableRowId(refRow) }}) -->

Loading…
Cancel
Save