react-native-sectioned-multi-select icon indicating copy to clipboard operation
react-native-sectioned-multi-select copied to clipboard

Keep modal open until confirmed in single selection mode

Open skizzo opened this issue 5 years ago • 4 comments

Hi, first of all, thanks for this great component!

I noticed that when I add the single={true} property to my SectionedMultiSelect, the whole view automatically closes as soon as I change my selection once, independent of whether I have a confirm button or not. Is it possible to prevent this somehow?

I know the workaround would be to set single={false} and then on each selection change just compare the selected items with the last ones in my custom onSelectedItemsChange function and compute a new Array with just one single item selected, but this feels a bit hacky.

Thanks!

skizzo avatar Jun 21 '19 09:06 skizzo

I'd say do that for now... Could be addded as a prop although I'm trying to limit new props as there are nearly 70 in this lib.

renrizzolo avatar Jun 21 '19 10:06 renrizzolo

is there new prop to do that

empiteranga avatar Jun 23 '20 11:06 empiteranga

@renrizzolo Any news on this prop? Thanks!

UtilExe avatar Aug 05 '22 10:08 UtilExe

I think we can just add closeOnSingleSelect prop and check for it here https://github.com/renrizzolo/react-native-sectioned-multi-select/blob/master/lib/sectioned-multi-select.js#L616

renrizzolo avatar Sep 08 '22 04:09 renrizzolo

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 09 '22 03:10 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Oct 14 '22 04:10 github-actions[bot]

Heres the patch-package file in case anyone wants to add closeOnSingleSelect prop Uploading react-native-sectioned-multi-select+0.10.0.patch…

henryteng07 avatar Jun 01 '24 11:06 henryteng07