### Start Metro Server Source: https://github.com/azeezat/react-native-select/blob/main/CONTRIBUTING.md Starts the Metro server for the example application, allowing for live reloading during development. ```sh yarn start ``` -------------------------------- ### Run Example App on iOS Source: https://github.com/azeezat/react-native-select/blob/main/CONTRIBUTING.md Builds and runs the example application on an iOS simulator or device. ```sh yarn ios ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/azeezat/react-native-select/blob/main/CONTRIBUTING.md Run this command in the root directory to install all necessary dependencies for the project. ```sh yarn ``` -------------------------------- ### Run Example App on Android Source: https://github.com/azeezat/react-native-select/blob/main/CONTRIBUTING.md Builds and runs the example application on an Android device or emulator. ```sh yarn android ``` -------------------------------- ### Bootstrap Project Dependencies Source: https://github.com/azeezat/react-native-select/blob/main/CONTRIBUTING.md Installs all dependencies and pods to set up the project for development. ```sh yarn bootstrap ``` -------------------------------- ### Install react-native-input-select Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/README.md Install the library using npm or yarn. Ensure peer dependencies like react and react-native are met, along with react-native-safe-area-context. ```bash npm install react-native-input-select # or yarn add react-native-input-select ``` -------------------------------- ### Install CocoaPods Dependencies Source: https://github.com/azeezat/react-native-select/blob/main/example/README.md Run these commands for iOS development. The first installs the Ruby bundler, and the second installs CocoaPods dependencies. ```sh bundle install bundle exec pod install ``` -------------------------------- ### Start Metro Bundler Source: https://github.com/azeezat/react-native-select/blob/main/example/README.md Run this command from the root of your React Native project to start the Metro dev server. ```sh # Using npm npm start # OR using Yarn yarn start ``` -------------------------------- ### Install with npm Source: https://github.com/azeezat/react-native-select/blob/main/README.md Use this command to add the react-native-input-select package to your project using npm. ```bash npm install react-native-input-select ``` -------------------------------- ### Accessibility Example for DropdownSelect Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/README.md Demonstrates how to configure accessibility props for screen readers and automation. ```typescript ``` -------------------------------- ### Install with yarn Source: https://github.com/azeezat/react-native-select/blob/main/README.md Use this command to add the react-native-input-select package to your project using yarn. ```bash yarn add react-native-input-select ``` -------------------------------- ### CheckBox Example Usage Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/api-reference/components.md Demonstrates how to use the CheckBox component with custom labels, values, colors, and styling options. ```typescript setAccepted(checked)} primaryColor="blue" checkboxControls={{ checkboxSize: 18, checkboxStyle: { borderColor: 'blue' }, }} /> ``` -------------------------------- ### Build and Run iOS App Source: https://github.com/azeezat/react-native-select/blob/main/example/README.md After installing CocoaPods dependencies, use this command to build and run your iOS app with Metro running. ```sh # Using npm npm run ios # OR using Yarn yarn ios ``` -------------------------------- ### Search Scope Example Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/api-reference/search-functionality.md Demonstrates how search can match both the 'label' and 'value' properties of options. Users can search by visible text or underlying values. ```typescript const options = [ { label: 'New York', value: 'NY' }, { label: 'California', value: 'CA' }, ]; // Both of these searches match "New York": // - Typing "New" // - Typing "NY" ``` -------------------------------- ### Example Usage of CustomModal Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/api-reference/components.md Demonstrates how to use the CustomModal component with custom styling for the overlay and container, and passing children for the modal content. ```jsx {/* List component here */} ``` -------------------------------- ### DropdownSectionList Example Usage Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/api-reference/components.md Example of how to use the DropdownSectionList component with multiple selection enabled. Ensure 'sectionedOptions', 'selected', and 'onChange' are defined in your component. ```typescript ``` -------------------------------- ### Example Usage of useSearch Hook Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/api-reference/hooks.md Demonstrates how to use the useSearch hook to manage search functionality, including accessing search state and filtered options. ```typescript const { searchValue, setSearchValue, filteredOptions, isSectionList } = useSearch({ initialOptions: myOptions, optionLabel: 'name', optionValue: 'id', searchCallback: (text) => console.log('User typed:', text), }); ``` -------------------------------- ### Input Component Usage Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/api-reference/components.md Example of using the Input component for a searchable text field. Customize placeholder, colors, and styles as needed. ```typescript ``` -------------------------------- ### Imperative Handle Usage Example Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/types.md Demonstrates how to use the `useRef` hook to access and call imperative methods like `open` on the DropdownSelect component. ```typescript const dropdownRef = useRef(null); dropdownRef.current?.open(); ``` -------------------------------- ### DropdownFlatList Component Usage Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/api-reference/components.md Example of using the DropdownFlatList component for single selection. Configure options, labels, values, and selection handlers. ```typescript ``` -------------------------------- ### DropdownSelect Accessibility Example Source: https://github.com/azeezat/react-native-select/blob/main/_autodocs/api-reference/ref-handle.md Shows how to enhance DropdownSelect accessibility using React Native's AccessibilityInfo API. This example announces status updates to screen readers when the dropdown is opened. ```typescript import React, { useRef, useState } from 'react'; import { View, Button, AccessibilityInfo } from 'react-native'; import DropdownSelect from 'react-native-input-select'; import type { DropdownSelectHandle } from 'react-native-input-select'; function AccessibleDropdown() { const dropdownRef = useRef(null); const [selected, setSelected] = useState(''); const handleAccessibleOpen = async () => { // Announce to screen readers await AccessibilityInfo.announceForAccessibility( 'Opening dropdown, please wait' ); dropdownRef.current?.open(); setTimeout(() => { AccessibilityInfo.announceForAccessibility( 'Dropdown opened. Select an option' ); }, 500); }; return (