Open admwx7 opened 8 years ago
This looks related to: https://github.com/formly-js/angular-formly/issues/586
Do you mind creating an example? Please follow the instructions here: http://help.angular-formly.com
Turns out it's actually the maxlength field that's causing this issue, not type: 'number'
This is weird, feel free to investigate further and submit a PR if you find the issue.
Given field
when running
options.resetModel()
, with updated defaultValue, on the form the value ofmodel.address.zip
gets cleared, if I then runoptions.resetModel()
again it is repopulated with the default value as expected, it's working as a toggled value essentially, however the viewValue is always correct. If I update the viewValue it will repopulate the model value correctly from that point on to match. If I remove thetype: 'number'
there is no issue, aside from the fact it's no longer validating that the entry is a number...