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() const { t } = useI18n()
function updateView() { const updateView = useDebounceFn(
if ((formViewData.value?.subheading?.length || 0) > 255) { () => {
message.error(t('msg.error.formDescriptionTooLong')) if ((formViewData.value?.subheading?.length || 0) > 255) {
return return message.error(t('msg.error.formDescriptionTooLong'))
} }
updateFormView(formViewData.value)
} updateFormView(formViewData.value)
},
500,
{ maxWait: 5000 },
)
async function submitForm() { async function submitForm() {
try { try {

Loading…
Cancel
Save