Fix for resetting the default config when the groups are cleared
This commit is contained in:
parent
162d0d0c7e
commit
e389bd8121
|
@ -39,12 +39,6 @@
|
|||
export let toReadable
|
||||
export let toRuntime
|
||||
|
||||
const defaultConf = {
|
||||
logicalOperator: FilterGroupLogicalOperator.ALL,
|
||||
onEmptyFilter: EmptyFilterOption.RETURN_NONE,
|
||||
groups: [],
|
||||
}
|
||||
|
||||
$: editableFilters = filters ? Helpers.cloneDeep(filters) : null
|
||||
|
||||
$: {
|
||||
|
@ -218,8 +212,12 @@
|
|||
}
|
||||
}
|
||||
} else if (addGroup) {
|
||||
if (!editable) {
|
||||
editable = defaultConf
|
||||
if (!editable?.groups?.length) {
|
||||
editable = {
|
||||
logicalOperator: FilterGroupLogicalOperator.ALL,
|
||||
onEmptyFilter: EmptyFilterOption.RETURN_NONE,
|
||||
groups: [],
|
||||
}
|
||||
}
|
||||
editable.groups.push({
|
||||
logicalOperator: Constants.FilterOperator.ANY,
|
||||
|
|
Loading…
Reference in New Issue