change(ui) - widget filters handle duration null
This commit is contained in:
parent
9b4cc126b4
commit
5d0c082124
1 changed files with 5 additions and 1 deletions
|
|
@ -77,7 +77,8 @@ export default class FilterItem {
|
|||
this.options = _filter.options;
|
||||
this.isEvent = _filter.isEvent;
|
||||
|
||||
(this.value = json.value.length === 0 || !json.value ? [''] : json.value), (this.operator = json.operator);
|
||||
(this.value = json.value.length === 0 || !json.value ? [''] : json.value);
|
||||
(this.operator = json.operator);
|
||||
this.source = json.source;
|
||||
this.sourceOperator = json.sourceOperator;
|
||||
|
||||
|
|
@ -100,6 +101,9 @@ export default class FilterItem {
|
|||
sourceOperator: this.sourceOperator,
|
||||
filters: Array.isArray(this.filters) ? this.filters.map((i) => i.toJson()) : [],
|
||||
};
|
||||
if (this.type === FilterKey.DURATION) {
|
||||
json.value = this.value.map((i: any) => !i ? 0 : i)
|
||||
}
|
||||
return json;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue