minimalect
minimalect copied to clipboard
Re: Issue 45
In the jsfiddle you made, it seems the populate works fine, though when you try to select something in the second menu, it doesn't hold the value clicked on. Any ideas why this would happen? I'm in Chrome at the moment.
Oh wait.. I think its allowing mutiple selections. Maybe that explains it. Is there a way to disable this?
Multiple selections shouldn't be on for any selects unless the original element has the multiple property. This is a bug; I'll have to do some investigation. Sorry about this!
@groenroos Any closer on this? I'm getting the same problems now.
This bug is a bit of a bummer.
@groenroos Do you know what is causing this problem? Maybe we can help you can tell us where to look.
i'm having the same problem right now! any update on this? thanks
Would love an update here! :)
I've delved into the code, and 'hacked' a solution here...
copied line 108:
this.items = this.wrapper.find('li');
...to line 550, meaning when a selection is made the array of options is refreshed from the dynamically created content, rather than the old array of original options.
Does the trick for me - albeit probably not very efficient. Perhaps @groenroos will have a moment to review and fix properly.
Kind regards,
Tom
Ah, better still - inject the following at line 208...
m.items = m.wrapper.find('li');
This performs the update, but only when the DOM changes, and not on every selection change. :)
I'm having similar problems, but with the 'update' function. I'm using React to dynamically render select lists, the default mutate doesn't seem to work (because it's not in the DOM) - but the update function does. Any idea how to hack the plugin so that the new options are selectable?