Page 1 of 2

Appery and Native Select Menu refresh differences

Posted: Sat Nov 28, 2015 1:59 am
by Jack Bua

I have a select menu populated with the following code

setTimeout(function() {
Apperyio("emp_select").val("");
Apperyio("emp_select").refresh();
}, 10);

-OR-

setTimeout(function() {
Apperyio("emp_select").val("").selectmenu('refresh');
}, 10);

On the following mapping:

Image

This results in the menu defaulting to a manually inoutted value, set up as shown:
Image

The issue I am having is that when a user selects an item from the menu, the menu refreshes. However, this does not happen if I set the menu component as a Native Menu.

Is there a way I can default to a certain value like so yet have the select menu keep its selected value?


Appery and Native Select Menu refresh differences

Posted: Mon Nov 30, 2015 3:32 pm
by Serhii Kulibaba

Hello Jack,

Please use this code:

Apperyio("emp_select").val("").selectmenu('refresh');

on the survice's success event


Appery and Native Select Menu refresh differences

Posted: Mon Nov 30, 2015 8:36 pm
by Jack Bua

I cant use just that code alone or the select menu defaults to the first value in the list, so I have to wrap it with a timeout, like so:

setTimeout(function() {
Apperyio("emp_select").val("").selectmenu('refresh');
}, 10);

which has the same result as the code I mentioned above.


Appery and Native Select Menu refresh differences

Posted: Tue Dec 01, 2015 5:30 pm
by Serhii Kulibaba

Do you still have this issue? If so - please share (http://devcenter.appery.io/documentat...) your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and provide us with the following information:

1) App name
2) Test credentials if login functionality is implemented in your app
3) Detailed steps to reproduce the issue


Appery and Native Select Menu refresh differences

Posted: Tue Dec 01, 2015 9:40 pm
by Jack Bua

BC Speedway
test
123

That login will take you directly to the page. This page affects production data, but as long as you manipulate the select menu only, no problems will occur.

Reproduce the issue by selecting a item from the drop-down.

You can click the blue button "Clone with Native Menu" to go to a clone of the page with one difference: a native menu instead.


Appery and Native Select Menu refresh differences

Posted: Wed Dec 02, 2015 9:56 pm
by Serhii Kulibaba

Please write us, where do you use that JS code. I can't find it in your app.


Appery and Native Select Menu refresh differences

Posted: Wed Dec 02, 2015 10:01 pm
by Jack Bua

On success of the "mgr_payroll_user" service.

Image


Appery and Native Select Menu refresh differences

Posted: Fri Dec 04, 2015 6:19 pm
by Serhii Kulibaba

Jack, please move JS code from here: http://prntscr.com/9abxvy to the success event of that service


Appery and Native Select Menu refresh differences

Posted: Fri Dec 04, 2015 10:17 pm
by Jack Bua

I did that and get the same result.


Appery and Native Select Menu refresh differences

Posted: Mon Dec 07, 2015 10:21 am
by Serhii Kulibaba

"Filter By Employee..." is selected by default. Is it correct behavior? http://prntscr.com/9bam7v