0.1.4 • Published 3 years ago

react-native-multiple-select-hac v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-native-multiple-select-hac

Content type (Vertical and horizontal)Modal LightModal Dark
content !modal Lightmodal dark

react-native-multiple-select-hac

react native multiple select

Installation

npm install react-native-multiple-select-hac

Usage

import MultipleSelect from "react-native-multiple-select-hac";

// ...

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

The component takes 3 compulsory props - items, uniqueKey, value and setValue . Other props are optional. The table below explains more.

Props

PropRequiredPurpose
uniqueKeyNo(String) Defaults to "value". Unique identifier that is part of each item's properties. Used internally as means of identifying each item
itemsNoState variable that holds the items.
valueNo(array) State variable that specifies the value of the selected item. It's an array of values for multiple item pickers.
setValueNo((callback: SetStateAction) => void) State callback that is called when the value changes.
displayedObjectNo(String) Defaults to "label". This string will be used to select the key to display the objects in the items array
topTextNo(String) Top Text for multiple select
topTextStyleNo(StyleProp) Style for top text
themeNo(light / dark) Theme for component
searchableNo(boolean) Defaults to "false". Enables the search feature in the drop-down menu / modal.
placeholderNo(String) Defaults to 'Select items'. Placeholder text displayed in multi-select filter input
onSelectedItemsChangeNo(void function) Callback that returns the selected item / items.
placeholderStyleNo(StyleProp) Styling for placeholder
maxNo(number) Specifies the maximum number of items.
categorySelectableNo(boolean) Defaults to 'false'. Allows selection of categories
parentNo(string) The children have the parent's value as their parent key.
clearTextNo(string) Defaults to 'Clear'. Text for remove all selected button.
clearStyleNo(StyleProp) Styling for clearText
confirmButtonTextNo(string) Defaults to 'Confirm'. Confirm button text.
confirmButtonTextStyleNo(StyleProp) Styling for confirm button's text
confirmButtonStyleNo(StyleProp) Styling for confirm button
verticalNo(boolean) Defaults to 'false'. Display mode of selected items
verticalMaxHeightNo(number) Defaults to '200'. Height of vertical mode
contentStyleNo(StyleProp) Styling for content
modalContentStyleNo(StyleProp) Styling for modal content
modalContainerNo(StyleProp) Styling for modal container
containerStyleNo(StyleProp) Styling for container
badgeIconNo(ReactNode) Icon for badge
badgeTextStyleNo(StyleProp) Styling for badge's text
crossStyleNo(string) Color for badge's cross icon
headerIconNo(ReactNode) Icon for modal close button
leftStyleNo(StyleProp) Icon styling for modal close button
headerStyleNo(StyleProp) Styling for modal header