fix: use frm.set_value for updating fields (#22860)

Just updating frm.doc object doesn't update the underlying model. In Frappe `frm.doc` is NOT the primary representation or source of truth for better or worse.
This commit is contained in:
Ankush Menat 2023-10-23 14:14:30 +05:30 committed by GitHub
parent c4c5f02f60
commit a3db75e161
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -201,7 +201,7 @@ export const useStore = defineStore("form-builder-store", () => {
let fields = get_updated_fields();
let has_error = validate_fields(fields, doc.value.istable);
if (has_error) return has_error;
doc.value.fields = fields;
frm.value.set_value("fields", fields);
return fields;
} catch (e) {
console.error(e);