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 toReadable
|
||||||
export let toRuntime
|
export let toRuntime
|
||||||
|
|
||||||
const defaultConf = {
|
|
||||||
logicalOperator: FilterGroupLogicalOperator.ALL,
|
|
||||||
onEmptyFilter: EmptyFilterOption.RETURN_NONE,
|
|
||||||
groups: [],
|
|
||||||
}
|
|
||||||
|
|
||||||
$: editableFilters = filters ? Helpers.cloneDeep(filters) : null
|
$: editableFilters = filters ? Helpers.cloneDeep(filters) : null
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
|
@ -218,8 +212,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (addGroup) {
|
} else if (addGroup) {
|
||||||
if (!editable) {
|
if (!editable?.groups?.length) {
|
||||||
editable = defaultConf
|
editable = {
|
||||||
|
logicalOperator: FilterGroupLogicalOperator.ALL,
|
||||||
|
onEmptyFilter: EmptyFilterOption.RETURN_NONE,
|
||||||
|
groups: [],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
editable.groups.push({
|
editable.groups.push({
|
||||||
logicalOperator: Constants.FilterOperator.ANY,
|
logicalOperator: Constants.FilterOperator.ANY,
|
||||||
|
|
Loading…
Reference in New Issue