Parcourir la source

fix: Allow searching in multiselect field by fields in search fields and show search field related info (#8558)

* fix: Allow searching in multiselect field by fileds in search fields and show search field related info

* fix: Check icon alignment
version-14
Deepesh Garg il y a 5 ans
committed by mergify[bot]
Parent
révision
5666429a88
1 fichiers modifiés avec 9 ajouts et 6 suppressions
  1. +9
    -6
      frappe/public/js/frappe/form/controls/multiselect_list.js

+ 9
- 6
frappe/public/js/frappe/form/controls/multiselect_list.js Voir le fichier

@@ -35,10 +35,10 @@ frappe.ui.form.ControlMultiSelectList = frappe.ui.form.ControlData.extend({
if (this.values.includes(opt.value)) {
return true;
}
match = Awesomplete.FILTER_CONTAINS(opt.label, txt);
if (!match) {
match = Awesomplete.FILTER_CONTAINS(opt.value, txt);
}
match = Awesomplete.FILTER_CONTAINS(opt.label, txt)
|| Awesomplete.FILTER_CONTAINS(opt.value, txt)
|| Awesomplete.FILTER_CONTAINS(opt.description, txt);
return match;
});
let options = this._selected_values
@@ -195,8 +195,11 @@ frappe.ui.form.ControlMultiSelectList = frappe.ui.form.ControlData.extend({
let encoded_value = encodeURIComponent(option.value);
let selected = this.values.includes(option.value) ? 'selected' : '';
return `<li class="selectable-item ${selected}" data-value="${encoded_value}">
${option.label}
<span class="octicon octicon-check text-muted"></span>
<div>
<strong>${option.label}</strong>
<div class="small">${option.description}</div>
</div>
<div><span class="octicon octicon-check text-muted"></span></div>
</li>`;
}).join('');
if (!html) {


Chargement…
Annuler
Enregistrer