fix(grid): Show filter row if some filters are already applied

This commit is contained in:
Suraj Shetty 2023-03-16 10:10:52 +05:30
parent 10a5861f11
commit 8aac4aae75

View file

@ -40,7 +40,7 @@ export default class GridRow {
render_row = this.render_row();
}
if (!this.render_row) return;
if (!render_row) return;
this.set_data();
this.wrapper.appendTo(this.parent);
@ -762,7 +762,8 @@ export default class GridRow {
show_search_row() {
// show or remove search columns based on grid rows
this.show_search = this.show_search && this.grid?.data?.length >= 20;
this.show_search =
this.show_search && (this.grid?.data?.length >= 20 || this.grid.filter_applied);
!this.show_search && this.wrapper.remove();
return this.show_search;
}