fix: rendering results on filter
This commit is contained in:
parent
0b0bbff3ab
commit
765bc7cb96
1 changed files with 6 additions and 2 deletions
|
|
@ -142,6 +142,7 @@ frappe.ui.form.MultiSelectDialog = Class.extend({
|
|||
clearTimeout($this.data('timeout'));
|
||||
$this.data('timeout', setTimeout(function() {
|
||||
frappe.flags.auto_scroll = false;
|
||||
me.empty_list();
|
||||
me.get_results();
|
||||
}, 300));
|
||||
});
|
||||
|
|
@ -198,7 +199,6 @@ frappe.ui.form.MultiSelectDialog = Class.extend({
|
|||
|
||||
render_result_list: function(results, more = 0) {
|
||||
var me = this;
|
||||
|
||||
var more_btn = me.dialog.fields_dict.more_btn.$wrapper;
|
||||
|
||||
// Make empty result set if filter is set
|
||||
|
|
@ -207,7 +207,7 @@ frappe.ui.form.MultiSelectDialog = Class.extend({
|
|||
}
|
||||
|
||||
if(results.length === 0) {
|
||||
this.$results.empty();
|
||||
this.empty_list();
|
||||
more_btn.hide();
|
||||
return;
|
||||
} else if(more) {
|
||||
|
|
@ -223,6 +223,10 @@ frappe.ui.form.MultiSelectDialog = Class.extend({
|
|||
}
|
||||
},
|
||||
|
||||
empty_list: function() {
|
||||
this.$results.find('.list-item-container').remove();
|
||||
},
|
||||
|
||||
get_results: function() {
|
||||
let me = this;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue