How to close modal after single item selection
TheNemus opened this issue · 3 comments
TheNemus commented
I'm struggling in order to find a way to close the modal after the user prompt its selection without using the "confirm" button.
It's possible?
I tried this:
function selectedItemsChangeHandler() {
sectionedMultiSelect && sectionedMultiSelect.current && sectionedMultiSelect.current._toggleSelector();
}
<SectionedMultiSelect
ref={sectionedMultiSelect}
items={items}
IconRenderer={Icon}
uniqueKey="id"
selectText="...."
hideSearch={true}
hideConfirm={true}
single={true}
onSelectedItemsChange={selectedItemsChangeHandler}
/>
but typescript says:
_Property 'toggleSelector' does not exist on type 'never'.ts(2339)
renrizzolo commented
I believe this ts example works, and uses the _toggleSelector
function
https://github.com/renrizzolo/react-native-sectioned-multi-select/blob/master/exampleapp/AppFunctional.tsx
github-actions commented
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 commented
This issue was closed because it has been stalled for 5 days with no activity.