dimanche 26 février 2017

Ember Changest –– cannot return field to original value

I've run into an issue using ember-changeset and ember-changeset-validations –– I have form fields that I am able to change to a new value, but once changed, I am unable to reset them to their original value.

This line from the set property method seems to be the problem somehow ––the it seems that my object should be returning yes that it does have the key but it is returning false:

} else if (obj.hasOwnProperty(key)) {

For example I start with value:

Start value: Canada Change to: Burundi - ok Change to: Canad -- unable to add final "a" -– when submitted, form will be submitted with value of "Canad" instead of "Canada"....

I assume this is not an issue with ember-changeset but an issue either with something I am doing wrong and/or something about my objects (JSON-API from Ember Data).

Have tried this in three different projects, trying to eliminate all possible external sources of trouble and have yet to find a solution.




Aucun commentaire:

Enregistrer un commentaire