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'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?
Hi Chris,
I've just checked and following code works as expected:
pre
Apperyio("mobileselectmenu_141").val("Vici").selectmenu('refresh', true)
/pre
Please give us your app public link and describe steps to reproduce this issue in your app.
Regards.
Hello all,
I'm having the same problem. When I use
codeApperyio("mobileselectmenu_141").val("Vici").selectmenu('refresh', true)/code
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.
Any advice?
Hi, Can someone respond to the last Q in this thread, I have same problem it shows the first item in the list. Thanks
Hi Daren,
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?
Regards.
Hi Yurii,
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:
code
var defaultchannel = localStorage.getItem('selectedchannel');
var $selectmenuid = Appery("mobileselectmenu_131");
$selectmenuid.val(defaultchannel);
$selectmenuid.selectmenu.trigger("change"); //('refresh', true);
/code
However, I always have the first value in the list as the default value, no matter what value I force 'selectedchannel' to.
Hello Derren,
Please use JS below:
prevar defaultchannel = localStorage.getItem('selectedchannel');
Apperyio("mobileselectmenu_131").val(defaultchannel ).refresh();/pre
Does mobileselectmenu_131 have option with value = defaultchannel ?
Hi Sergiy,
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?
Hello Darren,
Have you tried on value change event?