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. 12
      packages/nc-gui/components/smartsheet/Form.vue

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

Loading…
Cancel
Save