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' import { computed, inject, onMounted, ref } from '#imports'
interface Props { interface Props {
modelValue: number modelValue: number | null
} }
interface Emits { 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' import { EditModeInj } from '~/context'
interface Props { interface Props {
modelValue: number modelValue: number | null
} }
interface Emits { 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' import { EditModeInj } from '~/context'
interface Props { interface Props {
modelValue: string modelValue: string | null
} }
const props = defineProps<Props>() 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' import { EditModeInj } from '~/context'
interface Props { interface Props {
modelValue?: string modelValue: string | null
} }
const props = defineProps<Props>() const props = defineProps<Props>()

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

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

Loading…
Cancel
Save