Re-selecting an item in PickerList clears the selection. Is there some way of disabling this behavior (other than storing the previously selected index somewhere)?
Re-selecting item in PickerList(7 posts) (3 voices)
I cannot reproduce this issue. It should not be doing that.
Are you using a custom item renderer?
Yes, we are using several custom renderers which all behave like this. I can't find out what is it in those that could cause this and thought it might be default behavior.
And without posting any relevant code passages, that will probably stay like that.
For now it's enough for us to know that it's not feathers default behavior. Posting 1000+ lines of code here isn't that good idea either I think. Better try to reproduce it with something simpler if I ever have time for that
Pretty sure only a couple of lines are actually "relevant" for the issue you're facing.
But yes, try with the default PickerList renderer first and go from there.
Without seeing code, I can only make some guesses.
You should be dispatching Event.CHANGE any time that the value of isSelected changes. Otherwise, the list won't know that you made a change. The list includes some code to ensure that an item is always selected.
The other thing you should do is be sure that your item renderer dispatches Event.TRIGGERED when you tap/click it. That's the only way to be sure that the PickerList will close the list when you tap/click an item that is already selected.
You must log in to post.