Closed flovan closed 11 years ago
You likely don't need to nuke Minimalect just to update the selections. Did you try .trigger("change")
on the original subcategory select
? That should wake up Minimalect to update the choices.
No success with that.. I see the original select options updating, after which I call change()
or trigger('change')
, but the plugin generated drop-down remains the same. I know destructing it probably isn't the way to go, but I am still wondering why it isn't working.
If no other options remain, I will have to re-add the entire select into the DOM and hope for that to succeed, but I'd prefer to avoid that.
I found the issue!
In the change handler on the original element, the layout update was only done when the select had a value selected. I added following code below line 106 (where the if
ends):
else m.ul.html(markup+'<li class="'+m.options.class_empty+'">'+m.options.empty+'</li>');
This actually puts the updated <ul>
into the DOM, even when the select value was empty.
Glad you found a solution! I'll keep that in mind for the next version!
I have a subcategory select which is populated with new options each time the category select changes its value. On each change, I:
.minict_wrapper
classfor=
attribute of the parent labelBut then nothing happens.. I would expect at least an error or something, but I'm left in the dark. Any idea on how to handle this properly?