Selectable dropdown.
Any style of selectable dropdown not working. Dropdown menu is working but value does not change by selecting any of item.
I've verified in the docs version that the selection dropdown is changing the input field when a user selects a choice.
Can you fork this jsfiddle to show a test case? http://jsfiddle.net/jlukic/Vbr9d/1/
Maybe im doing something wrong, but im doing it like this: http://jsfiddle.net/UEnQD/ Value does not change.
"I've verified in the docs version that the selection dropdown is changing the input field when a user selects a choice." In the docs everything works good to me too.
Im using Chrome 30.0.1599.69 m, packaged version of semantic.min.js 0.3.5 and jquery 1.10.2.
Same issue.
temporary solution for me is: http://jsfiddle.net/2CjSu/
I found more sexy way to do it. Just use: http://jsfiddle.net/astronz/hfeft/
Problem with
if(settings.action == 'updateForm') {
module.set.selected();
}
At dropdown.js:84
Yea, that's cool ;)
Dropdowns default action is just to hide the menu, other actions can be specified by using settings.action updateForm, updateText, etc. You can also trigger your own action after the default action by using a callback, or setting action to a function.
I can understand the confusion though because a selection dropdown in particular usually needs this field updated, so shouldnt its behavior be by default to update it? I'll mark this as an enhancement.
@astronz That line sets the current hidden input value to the selected text on initialization. So whatever value was already in the form shows up.
Heres an example http://jsfiddle.net/tRxqQ/
This will be in next minor release.
@jlukic Thank you so much!