Merge pull request #13529 from Budibase/fix/clear-empty-filter-when-all-fields-are-removed

Fix for onEmptyFilter getting stuck on internal datasource filters.
This commit is contained in:
Andrew Kingston 2024-04-22 10:21:03 +01:00 committed by GitHub
commit bff6340763
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -67,6 +67,11 @@
const removeFilter = id => { const removeFilter = id => {
filters = filters.filter(field => field.id !== id) filters = filters.filter(field => field.id !== id)
// Clear all filters when no fields are specified
if (filters.length === 1 && filters[0].onEmptyFilter) {
filters = []
}
} }
const duplicateFilter = id => { const duplicateFilter = id => {