fix(filters): Allow filter on same field multiple times
This commit is contained in:
parent
48e18a11fd
commit
bdeae00a6e
3 changed files with 2 additions and 10 deletions
|
|
@ -144,11 +144,6 @@ frappe.ui.FieldSelect = Class.extend({
|
|||
table = df.parent;
|
||||
}
|
||||
|
||||
// check if this option should be added
|
||||
if (this.filter_options && this.filter_options(table, df.fieldname) === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(frappe.model.no_value_type.indexOf(df.fieldtype) == -1 &&
|
||||
!(me.fields_by_name[df.parent] && me.fields_by_name[df.parent][df.fieldname])) {
|
||||
this.options.push({
|
||||
|
|
|
|||
|
|
@ -48,9 +48,6 @@ frappe.ui.Filter = class {
|
|||
filter_fields: this.filter_fields,
|
||||
select: (doctype, fieldname) => {
|
||||
this.set_field(doctype, fieldname);
|
||||
},
|
||||
filter_options: (doctype, fieldname) => {
|
||||
return this.filter_items(doctype, fieldname);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ frappe.ui.FilterGroup = class {
|
|||
let promises = [];
|
||||
|
||||
for (const filter of filters) {
|
||||
promises.push(this.add_filter(...filter));
|
||||
promises.push(() => this.add_filter(...filter));
|
||||
}
|
||||
|
||||
return Promise.all(promises);
|
||||
return frappe.run_serially(promises);
|
||||
}
|
||||
|
||||
add_filter(doctype, fieldname, condition, value, hidden) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue