gxsshallot/react-native-picklist

[Question] Single select mode

Closed this issue · 2 comments

Hello,

I have a question regarding the single select mode. I found that in this mode, it is possible to deselect item. Is it expected behavior? If yes, is it possible to add props to disable this behavior?

If you need sample, ping me.

@barchinsky I have added cancelableWhenDirectBack property. To make it not cancelable in single level mode, you should set cancelableWhenDirectBack={false} and directBackWhenSingle={true} together. After setting the two properties, when you click on a selected item, it will directly go back with this item and will not deselect it.

I have published v1.2.1 to fix #1 and add cancelableWhenDirectBack for your demand in this issue. Thanks for using it~

Thank you! Looks like now everything works well!