[fix] show_no_result in reportview

This commit is contained in:
Faris Ansari 2017-03-08 11:20:56 +05:30
parent 46423117b8
commit d17aad5016

View file

@ -320,7 +320,19 @@ frappe.ui.BaseList = Class.extend({
values = this.get_values_from_response(r.message);
}
if (values.length || !this.show_no_result()) {
var show_results = true;
if(this.show_no_result) {
if($.isFunction(this.show_no_result)) {
show_results = !this.show_no_result()
} else {
show_results = !this.show_no_result;
}
}
// render result view when
// length > 0 OR
// explicitly set by flag
if (values.length || show_results) {
this.data = this.data.concat(values);
this.render_view(values);
this.update_paging(values);