I have a grid that has some data, and when I press an "edit" button, I want a wizard with forms to edit the contents over multiple pages. Because of all the binding, I figured I could re-use the same wizard and popup and just reload the data inside. This works pretty well until I add validation. For some reason setting model data results in the value being NULL inside the model.
const model = discountWizard.steps()[0].form.editable.options.model;
model.set("requiredField", "required"); // required: true in form
model.set("optionalField", "optional"); // required: false in form
// results in
dirtyFields: Object { requiredField: false, optionalField: true }
optionalField: "optional"
requiredField: null
I've added a reproducer in Dojo: https://dojo.telerik.com/eQoGApIL
How can I fix this?
On a sidenote, the reset button doesn't seem to do anything by default, is that intended?
Minor addition, it seems that this behavior is caused by "validateOnBlur" being set to true. While this still shouldn't happen, it seems to work when I disable this.
validatable: { validateOnBlur: false, },