🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-native-multiple-select-list

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-multiple-select-list

react-native-multiple-select-list

1.0.4
latest
Source
npm
Version published
Weekly downloads
40
-52.94%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-multiple-select-list

Multiple select list with search bar

Install :

npm install --save react-native-multiple-select-list

Example usage :

import CustomMultiPicker from "react-native-multiple-select-list";

const userList = {
  "123":"Tom",
  "124":"Michael",
  "125":"Christin"
}

<CustomMultiPicker
  options={userList}
  search={true} // should show search bar?
  multiple={true} //
  placeholder={"Search"}
  placeholderTextColor={'#757575'}
  returnValue={"label"} // label or value
  callback={(res)=>{ console.log(res) }} // callback, array of selected items
  rowBackgroundColor={"#eee"}
  rowHeight={40}
  rowRadius={5}
  iconColor={"#00a2dd"}
  iconSize={30}
  selectedIconName={"ios-checkmark-circle-outline"}
  unselectedIconName={"ios-radio-button-off-outline"}
  scrollViewHeight={130}
  selected={[1,2]} // list of options which are selected by default
/>

react-native-multiple-select-list

Props:

PropTypeDescription
optionsObjectlist of options/items
searchBooleanif the search bar should be shown or not
multipleBooleanif user can select multiple options or not. if you select an item which is already selected, it will be unselected. if multiple is disabled, it will work like radio buttons.
placeholderStringplaceholder text for search bar
placeholderTextColorStringplaceholder text color for search bar
returnValueStringshould it return keys of selected options or values?
callbackFunctionwhenever user selects or changes selections it will be called.
rowBackgroundColorStringbackground color for each row in list
rowHeightIntegerrow height
rowRadiusIntegerrow border radius
iconColorStringicon color for checked/unchecked icons and search icon also border color of search bar
iconSizeIntegericon size for checked/unchecked icons
selectedIconNameStringselected/checked icon name (react-native-vector-icons/Ionicon)
unselectedIconNameStringunselected/unchecked icon name (react-native-vector-icons/Ionicon)
scrollViewHeightIntegerscrollview height (list of items)
selectedObjectlist of options which are selected by default

Author:

Ata S.Mohammadi. ataomega@gmail.com

Keywords

react

FAQs

Package last updated on 20 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts