fix(desk): Allow setting filters_description via df API (#21382)
This commit is contained in:
parent
1283ece760
commit
6303e53eda
1 changed files with 11 additions and 9 deletions
|
|
@ -267,15 +267,17 @@ frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlDat
|
|||
r.results = me.merge_duplicates(r.results);
|
||||
|
||||
// show filter description in awesomplete
|
||||
if (args.filters) {
|
||||
let filter_string = me.get_filter_description(args.filters);
|
||||
if (filter_string) {
|
||||
r.results.push({
|
||||
html: `<span class="text-muted" style="line-height: 1.5">${filter_string}</span>`,
|
||||
value: "",
|
||||
action: () => {},
|
||||
});
|
||||
}
|
||||
let filter_string = me.df.filter_description
|
||||
? me.df.filter_description
|
||||
: args.filters
|
||||
? me.get_filter_description(args.filters)
|
||||
: null;
|
||||
if (filter_string) {
|
||||
r.results.push({
|
||||
html: `<span class="text-muted" style="line-height: 1.5">${filter_string}</span>`,
|
||||
value: "",
|
||||
action: () => {},
|
||||
});
|
||||
}
|
||||
|
||||
if (!me.df.only_select) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue