forked from extern/egroupware
For push update filter, consider empty array as having no value
This commit is contained in:
parent
12c315abbc
commit
1eb174d3f7
@ -243,15 +243,15 @@ var EgwApp = /** @class */ (function () {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
// Get current filter values
|
// Get current filter values
|
||||||
if (this.et2) {
|
var value = nm.getValue();
|
||||||
var value = nm.getValue();
|
if (!value || !value.col_filter)
|
||||||
if (!value || !value.col_filter)
|
return false;
|
||||||
return false;
|
for (var _i = 0, _a = Object.values(filters); _i < _a.length; _i++) {
|
||||||
for (var _i = 0, _a = Object.values(filters); _i < _a.length; _i++) {
|
var field_filter = _a[_i];
|
||||||
var field_filter = _a[_i];
|
var val = value.col_filter[field_filter.col];
|
||||||
if (value.col_filter[field_filter.col]) {
|
if (val && (typeof val == "string" && val.trim().length > 0 ||
|
||||||
field_filter.filter_values.push(value.col_filter[field_filter.col]);
|
typeof val == "object" && !jQuery.isEmptyObject(val))) {
|
||||||
}
|
field_filter.filter_values.push(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var _loop_2 = function (field_filter) {
|
var _loop_2 = function (field_filter) {
|
||||||
|
@ -373,17 +373,18 @@ export abstract class EgwApp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get current filter values
|
// Get current filter values
|
||||||
if(this.et2)
|
let value = nm.getValue();
|
||||||
{
|
if(!value || !value.col_filter) return false;
|
||||||
let value = nm.getValue();
|
|
||||||
if(!value || !value.col_filter) return false;
|
|
||||||
|
|
||||||
for(let field_filter of Object.values(filters))
|
for(let field_filter of Object.values(filters))
|
||||||
|
{
|
||||||
|
let val = value.col_filter[field_filter.col];
|
||||||
|
if(val && (
|
||||||
|
typeof val == "string" && val.trim().length > 0 ||
|
||||||
|
typeof val == "object" && !jQuery.isEmptyObject(val)
|
||||||
|
))
|
||||||
{
|
{
|
||||||
if(value.col_filter[field_filter.col])
|
field_filter.filter_values.push(val);
|
||||||
{
|
|
||||||
field_filter.filter_values.push(value.col_filter[field_filter.col]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user