Browse Source

refactor(gui-v2): type correction and null check

- input value can be null as well

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2987/head
Pranav C 2 years ago
parent
commit
38ed45d2fd
  1. 2
      packages/nc-gui-v2/components/cell/Decimal.vue
  2. 2
      packages/nc-gui-v2/components/cell/Integer.vue
  3. 2
      packages/nc-gui-v2/components/cell/Text.vue
  4. 2
      packages/nc-gui-v2/components/cell/TextArea.vue
  5. 2
      packages/nc-gui-v2/composables/useViewColumns.ts

2
packages/nc-gui-v2/components/cell/Decimal.vue

@ -2,7 +2,7 @@
import { computed, inject, onMounted, ref } from '#imports'
interface Props {
modelValue: number
modelValue: number | null
}
interface Emits {

2
packages/nc-gui-v2/components/cell/Integer.vue

@ -3,7 +3,7 @@ import { inject, ref, useVModel } from '#imports'
import { EditModeInj } from '~/context'
interface Props {
modelValue: number
modelValue: number | null
}
interface Emits {

2
packages/nc-gui-v2/components/cell/Text.vue

@ -3,7 +3,7 @@ import { inject, ref, useVModel } from '#imports'
import { EditModeInj } from '~/context'
interface Props {
modelValue: string
modelValue: string | null
}
const props = defineProps<Props>()

2
packages/nc-gui-v2/components/cell/TextArea.vue

@ -3,7 +3,7 @@ import { inject, ref, useVModel } from '#imports'
import { EditModeInj } from '~/context'
interface Props {
modelValue?: string
modelValue: string | null
}
const props = defineProps<Props>()

2
packages/nc-gui-v2/composables/useViewColumns.ts

@ -83,7 +83,7 @@ export function useViewColumns(
const metaColumnById = computed(() => {
return (
meta.value.columns?.reduce<Record<string, ColumnType>>((acc, curr) => {
meta.value?.columns?.reduce<Record<string, ColumnType>>((acc, curr) => {
return {
...acc,
[curr.id!]: curr,

Loading…
Cancel
Save