backbone-forms
backbone-forms copied to clipboard
Suggestion Select editor setOptions() should also store them
When calling a Select editors setOptions() method it never actually stores these options on the field as an object.
Either you do this manually via editor.schema.options = "new options",
or you have to trawl through the actual dom and pick out the select editors options using jQuery this.$el.find("option") and then map of the values needed.
I suggest changing the setOptions method, to "re-set" the schemas options. This way you can pick the raw options off the editor when using event listeners etc.. Maybe a utility function for retrieving the selects options without hitting the DOM could be a part of the editor.
https://github.com/powmedia/backbone-forms/blob/master/src/editors/select.js#L52
Sort of related to #274