fix(grid): date or datetime fields disappearing on save

This commit is contained in:
Sagar Vora 2021-09-16 12:47:34 +05:30 committed by GitHub
parent 23afeebb6d
commit fb508607e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,10 +123,12 @@ export default class GridRowForm {
.toggle(this.row.grid.is_editable());
}
refresh_field(fieldname) {
if(this.fields_dict[fieldname]) {
this.fields_dict[fieldname].refresh();
this.layout && this.layout.refresh_dependency();
}
const field = this.fields_dict[fieldname];
if (!field) return;
field.docname = this.row.doc.name;
field.refresh();
this.layout && this.layout.refresh_dependency();
}
set_focus() {
// wait for animation and then focus on the first row