Browse Source

Merge pull request #8752 from nocodb/nc-filter-bug

fix: Wait until any previous filter is saving
pull/8755/head
Pranav C 6 months ago committed by GitHub
parent
commit
56b285dc88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      packages/nc-gui/composables/useViewFilters.ts

7
packages/nc-gui/composables/useViewFilters.ts

@ -349,9 +349,12 @@ export function useViewFilters(
// if already in progress the debounced function which will call this function again with 500ms delay until it's not saving
if (savingStatus[i]) {
return saveOrUpdateDebounced(filter, i, force, undo, skipDataReload)
} else {
savingStatus[i] = true
}
// wait if any previous filter save is in progress, it's to avoid messing up the order of filters
else if (Array.from({ length: i }).some((_, index) => savingStatus[index])) {
return saveOrUpdateDebounced(filter, i, force, undo, skipDataReload)
}
savingStatus[i] = true
if (!view.value && !linkColId?.value) return

Loading…
Cancel
Save