If I selected a data in Sencha Touch Picker component and hide it, after I show the picker, the selection is only the first record every time.
I would like to show the picker with my last selection is picked.
I tried,
var selection = slot.getSelection();
picker.hide();
slot.select(selection);
picker.show();
in this case, the selection of slot is last selection that I wanted. However, the picker always showed with the first record is picked. Maybe it has been default value.
How to show picker with my last selection is picked ?
As per the document, you can use
slot'sselect method as follows:Here
keepExistingis boolean and if it is true, the existing selection will be added to new record and if not, the old selection will get replaced. So here, in your case old selection may get replaced. Hence using below code will help you to resolve the issue:Please read below note before using a
slot:Hope it will help you.