renrizzolo/react-native-sectioned-multi-select

How to close modal after single item selection

TheNemus opened this issue · 3 comments

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)

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.

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