ui: group filter: merge duplicate filters
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6a5a60ebfd
commit
c72f8784a5
|
@ -243,9 +243,14 @@ Ext.define('PBS.window.SyncJobEdit', {
|
||||||
xtype: 'inputpanel',
|
xtype: 'inputpanel',
|
||||||
onGetValues: function(values) {
|
onGetValues: function(values) {
|
||||||
PBS.Utils.delete_if_default(values, 'group-filter');
|
PBS.Utils.delete_if_default(values, 'group-filter');
|
||||||
if (Ext.isArray(values['group-filter']) && values['group-filter'].length === 0) {
|
if (Ext.isArray(values['group-filter'])) {
|
||||||
delete values['group-filter'];
|
if (values['group-filter'].length === 0) {
|
||||||
values.delete = 'group-filter';
|
delete values['group-filter'];
|
||||||
|
values.delete = 'group-filter';
|
||||||
|
} else {
|
||||||
|
// merge duplicates
|
||||||
|
values['group-filter'] = [...new Set(values['group-filter'])];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue