Merge pull request #13926 from rohitwaghchaure/fixed-grid-performance-issue
perf: Grid rendering
This commit is contained in:
commit
c6f1f91668
1 changed files with 4 additions and 1 deletions
|
|
@ -37,6 +37,8 @@ export default class Grid {
|
|||
}
|
||||
|
||||
this.is_grid = true;
|
||||
this.debounced_refresh = this.refresh.bind(this);
|
||||
this.debounced_refresh = frappe.utils.debounce(this.debounced_refresh, 500);
|
||||
}
|
||||
|
||||
allow_on_grid_editing() {
|
||||
|
|
@ -675,6 +677,7 @@ export default class Grid {
|
|||
if (!idx) {
|
||||
idx = this.grid_rows.length - 1;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this.grid_rows[idx].row
|
||||
.find('input[type="Text"],textarea,select').filter(':visible:first').focus();
|
||||
|
|
@ -934,6 +937,6 @@ export default class Grid {
|
|||
// update the parent too (for new rows)
|
||||
this.docfields.find(d => d.fieldname === fieldname)[property] = value;
|
||||
|
||||
this.refresh();
|
||||
this.debounced_refresh();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue