Browse Source

feat(nc-gui): debounce updating form view data

pull/3669/head
braks 2 years ago committed by Raju Udava
parent
commit
75e0a66b1d
  1. 18
      packages/nc-gui/components/smartsheet/Form.vue

18
packages/nc-gui/components/smartsheet/Form.vue

@ -97,13 +97,17 @@ const activeRow = ref('')
const { t } = useI18n()
function updateView() {
if ((formViewData.value?.subheading?.length || 0) > 255) {
message.error(t('msg.error.formDescriptionTooLong'))
return
}
updateFormView(formViewData.value)
}
const updateView = useDebounceFn(
() => {
if ((formViewData.value?.subheading?.length || 0) > 255) {
return message.error(t('msg.error.formDescriptionTooLong'))
}
updateFormView(formViewData.value)
},
500,
{ maxWait: 5000 },
)
async function submitForm() {
try {

Loading…
Cancel
Save