This PR should fix https://github.com/Mobius1/Selectr/issues/91
But I'm not sure, if the code around is still relevant. I tried some testcases with config.data and native options in select as initial markup and all seems to work.
Question
if (this.config.data) {
// Dump the options into the select
// otherwise the native dropdown will be empty
util.each(this.options, function(i, option) {
this.el.add(option);
}, this);
}
What's the role of this.config.data here?
data is already assigned to selectr and native select on build() call if I console.log(this.el) - so why adding the options again?
This PR should fix https://github.com/Mobius1/Selectr/issues/91 But I'm not sure, if the code around is still relevant. I tried some testcases with
config.data
and native options in select as initial markup and all seems to work.Question
this.config.data
here?data
is already assigned to selectr and native select onbuild()
call if Iconsole.log(this.el)
- so why adding the options again?