Browse Source

fix: on new row creation reset LTAR values

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5184/head
Pranav C 2 years ago
parent
commit
cbadeca212
  1. 6
      packages/nc-gui/components/smartsheet/expanded-form/index.vue

6
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -43,6 +43,8 @@ const props = defineProps<Props>()
const emits = defineEmits(['update:modelValue', 'cancel', 'next', 'prev']) const emits = defineEmits(['update:modelValue', 'cancel', 'next', 'prev'])
const key = ref(0)
const { t } = useI18n() const { t } = useI18n()
const row = ref(props.row) const row = ref(props.row)
@ -177,6 +179,8 @@ const addNewRow = () => {
oldRow: {}, oldRow: {},
rowMeta: { new: true }, rowMeta: { new: true },
} }
rowState.value = {}
key.value++
isExpanded.value = true isExpanded.value = true
}, 500) }, 500)
} }
@ -273,7 +277,7 @@ export default {
> >
<SmartsheetExpandedFormHeader :view="props.view" @cancel="onClose" @duplicate-row="onDuplicateRow" /> <SmartsheetExpandedFormHeader :view="props.view" @cancel="onClose" @duplicate-row="onDuplicateRow" />
<div class="!bg-gray-100 rounded flex-1"> <div :key="key" class="!bg-gray-100 rounded flex-1">
<div class="flex h-full nc-form-wrapper items-stretch min-h-[max(70vh,100%)]"> <div class="flex h-full nc-form-wrapper items-stretch min-h-[max(70vh,100%)]">
<div class="flex-1 overflow-auto scrollbar-thin-dull nc-form-fields-container relative"> <div class="flex-1 overflow-auto scrollbar-thin-dull nc-form-fields-container relative">
<template v-if="props.showNextPrevIcons"> <template v-if="props.showNextPrevIcons">

Loading…
Cancel
Save