Browse Source

fix: add default value to row height injection

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5332/head
mertmit 2 years ago
parent
commit
43aae02016
  1. 2
      packages/nc-gui/components/cell/ClampedText.vue
  2. 5
      packages/nc-gui/components/cell/Text.vue
  3. 5
      packages/nc-gui/components/cell/TextArea.vue
  4. 6
      packages/nc-gui/components/virtual-cell/QrCode.vue
  5. 5
      packages/nc-gui/components/virtual-cell/barcode/Barcode.vue

2
packages/nc-gui/components/cell/ClampedText.vue

@ -31,7 +31,7 @@ onMounted(() => {
:key="`clamp-${key}-${props.value?.toString().length || 0}`"
class="w-full h-full break-word"
:text="`${props.value || ' '}`"
:max-lines="props.lines"
:max-lines="props.lines || 1"
/>
</div>
</template>

5
packages/nc-gui/components/cell/Text.vue

@ -14,7 +14,10 @@ const { showNull } = useGlobal()
const editEnabled = inject(EditModeInj)
const rowHeight = inject(RowHeightInj)
const rowHeight = inject(
RowHeightInj,
computed(() => undefined),
)
const readonly = inject(ReadonlyInj, ref(false))

5
packages/nc-gui/components/cell/TextArea.vue

@ -10,7 +10,10 @@ const emits = defineEmits(['update:modelValue'])
const editEnabled = inject(EditModeInj)
const rowHeight = inject(RowHeightInj)
const rowHeight = inject(
RowHeightInj,
computed(() => undefined),
)
const { showNull } = useGlobal()

6
packages/nc-gui/components/virtual-cell/QrCode.vue

@ -21,7 +21,11 @@ const qrCodeOptions: QRCode.QRCodeToDataURLOptions = {
quality: 1,
},
}
const rowHeight = inject(RowHeightInj)
const rowHeight = inject(
RowHeightInj,
computed(() => undefined),
)
const qrCode = useQRCode(qrValue, {
...qrCodeOptions,

5
packages/nc-gui/components/virtual-cell/barcode/Barcode.vue

@ -32,7 +32,10 @@ const showBarcode = computed(() => barcodeValue?.value.length > 0 && !tooManyCha
const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = useShowNotEditableWarning()
const rowHeight = inject(RowHeightInj)
const rowHeight = inject(
RowHeightInj,
computed(() => undefined),
)
</script>
<template>

Loading…
Cancel
Save