Overview
The react-native-sectioned-multi-select is a multi (or single) select component designed for long lists, supporting subcategories, search, and chips. Developed for use in a Modal due to issues with nested ScrollViews on Android, it allows for the display of categories with subcategories. The component is based on react-native-multiple-select but offers enhancements to address specific use cases such as nested data and modal presentation.
Features
- Multi (or Single) Select: Allows users to select multiple or single options.
- Subcategories: Supports nested categories and subcategories for organizational purposes.
- Search Functionality: Enables users to search for specific items within the list.
- Chips Display: Displays selected items as chips for easy visualization.
- Modal Presentation: Opens in a modal for user selection, ideal for long lists.
- Custom Icons: Allows customization of icons using react-native-vector-icons or custom icons.
- Programmatic Operations: Offers internal methods for operations like removing all items or toggling the modal.
Installation
To install the react-native-sectioned-multi-select package, you can use either npm or yarn.
npm i react-native-sectioned-multi-select
or
yarn add react-native-sectioned-multi-select
Summary
The react-native-sectioned-multi-select component is a versatile solution for handling selections in long lists with subcategories. It provides essential features like search, chip display, and customizable icons while offering programmatic control through internal methods. With its focus on nested data structures and modal presentation, it addresses common challenges faced when dealing with complex selection scenarios.