Browse Source

fix(gui-v2): null check

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2983/head
Pranav C 2 years ago
parent
commit
c4d1bab95e
  1. 2
      packages/nc-gui-v2/components/cell/Email.vue
  2. 2
      packages/nc-gui-v2/components/cell/Float.vue
  3. 2
      packages/nc-gui-v2/components/cell/Integer.vue
  4. 2
      packages/nc-gui-v2/components/cell/Text.vue
  5. 2
      packages/nc-gui-v2/components/cell/TextArea.vue
  6. 2
      packages/nc-gui-v2/components/cell/Url.vue

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

@ -21,7 +21,7 @@ const vModel = useVModel(props, 'modelValue', emits)
const validEmail = computed(() => isEmail(vModel.value))
const focus = (el: HTMLInputElement) => el.focus()
const focus = (el: HTMLInputElement) => el?.focus()
</script>
<template>

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

@ -18,7 +18,7 @@ const editEnabled = inject(EditModeInj, ref(false))
const vModel = useVModel(props, 'modelValue', emits)
const focus = (el: HTMLInputElement) => el.focus()
const focus = (el: HTMLInputElement) => el?.focus()
</script>
<template>

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

@ -18,7 +18,7 @@ const editEnabled = inject(EditModeInj, ref(false))
const vModel = useVModel(props, 'modelValue', emit)
const focus = (el: HTMLInputElement) => el.focus()
const focus = (el: HTMLInputElement) => el?.focus()
function onKeyDown(evt: KeyboardEvent) {
return evt.key === '.' && evt.preventDefault()

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

@ -14,7 +14,7 @@ const editEnabled = inject(EditModeInj, ref(false))
const vModel = useVModel(props, 'modelValue', emits)
const focus = (el: HTMLInputElement) => el.focus()
const focus = (el: HTMLInputElement) => el?.focus()
</script>
<template>

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

@ -14,7 +14,7 @@ const editEnabled = inject(EditModeInj, ref(false))
const vModel = useVModel(props, 'modelValue', emits)
const focus = (el: HTMLTextAreaElement) => el.focus()
const focus = (el: HTMLTextAreaElement) => el?.focus()
</script>
<template>

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

@ -26,7 +26,7 @@ const vModel = computed({
const isValid = computed(() => value && isValidURL(value))
const focus = (el: HTMLInputElement) => el.focus()
const focus = (el: HTMLInputElement) => el?.focus()
</script>
<template>

Loading…
Cancel
Save