Browse Source

fix: add missing await

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/8396/head
Pranav C 6 months ago
parent
commit
4cbe8dcba2
  1. 3
      packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue

3
packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue

@ -376,12 +376,13 @@ const isLogicalOpChangeAllowed = computed(() => {
return new Set(filters.value.slice(1).map((filter) => filter.logical_op)).size > 1
})
// when logical operation is updated, update all the siblings with the same logical operation only if it's in locked state
const onLogicalOpUpdate = async (filter: Filter, index: number) => {
if (index === 1 && filters.value.slice(2).every((siblingFilter) => siblingFilter.logical_op !== filter.logical_op)) {
await Promise.all(
filters.value.slice(2).map(async (siblingFilter, i) => {
siblingFilter.logical_op = filter.logical_op
saveOrUpdate(siblingFilter, i + 2, false, false, true)
await saveOrUpdate(siblingFilter, i + 2, false, false, true)
}),
)
}

Loading…
Cancel
Save