Explorar el Código

fix: grid frozen issue

version-14
Rohit Waghchaure hace 3 años
padre
commit
e63222cc9a
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. +4
    -1
      frappe/public/js/frappe/form/grid.js

+ 4
- 1
frappe/public/js/frappe/form/grid.js Ver fichero

@@ -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();
}
}

Cargando…
Cancelar
Guardar