I'm having the same issue which is neither solved by trigger('change') nor by selectmenu('refresh',true). Has there been any progress on this one?
I've just checked and following code works as expected:
Please give us your app public link and describe steps to reproduce this issue in your app.
I'm having the same problem. When I use
for the default SelectMenu, the default value is changed accordingly.
However when I try to apply the same logic to my SelectMenu object, the desired value is not displayed - in fact it's the first value in the list that's displayed.
Hi, Can someone respond to the last Q in this thread, I have same problem it shows the first item in the list. Thanks
You sad it worked for "default SelectMenu" but not works for "my SelectMenu object" it does not works.
Please specify what is "my SelectMenu object". Is that custom HTML select? Or component from appery.io toolbar?
My SelectMenu object is a component from the appery.io toolbar. I clear out the default values (veni, vini, vici) and then use the mapping facility, from within my created service, to populate the menu object, as below.
Then I try to force the default value using the following code:
var defaultchannel = localStorage.getItem('selectedchannel');
var $selectmenuid = Appery("mobileselectmenu_131");
$selectmenuid.selectmenu.trigger("change"); //('refresh', true);
However, I always have the first value in the list as the default value, no matter what value I force 'selectedchannel' to.
Please use JS below:
prevar defaultchannel = localStorage.getItem('selectedchannel');
Does mobileselectmenu_131 have option with value = defaultchannel ?
I still have the same issue with the above code.
Also, I don't see anywhere that I can set a value for the selectmenu. The only action that I can see, which seems to be relevant, is 'value changed'.
Any other ideas to address this issue?
Have you tried on value change event?