Installations
npm install react-native-select-multiple
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
12.11.0
NPM Version
6.11.3
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
tableflip
Download Statistics
Total Downloads
362,775
Last Day
6
Last Week
6
Last Month
3,444
Last Year
54,601
GitHub Statistics
192 Stars
55 Commits
62 Forks
8 Watching
3 Branches
12 Contributors
Package Meta Information
Latest Version
2.1.0
Package Id
react-native-select-multiple@2.1.0
Unpacked Size
14.39 kB
Size
5.54 kB
File Count
10
NPM Version
6.11.3
Node Version
12.11.0
Total Downloads
Cumulative downloads
Total Downloads
362,775
Last day
0%
6
Compared to previous day
Last week
-99.1%
6
Compared to previous week
Last month
-4%
3,444
Compared to previous month
Last year
-23.4%
54,601
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
4
react-native-select-multiple
A customiseable FlatList that allows you to select multiple rows.
Install
1npm install react-native-select-multiple
Usage
1import React, { Component } from 'react' 2import { View } from 'react-native' 3import SelectMultiple from 'react-native-select-multiple' 4 5const fruits = ['Apples', 'Oranges', 'Pears'] 6// --- OR --- 7// const fruits = [ 8// { label: 'Apples', value: 'appls' }, 9// { label: 'Oranges', value: 'orngs' }, 10// { label: 'Pears', value: 'pears' } 11// ] 12 13class App extends Component { 14 state = { selectedFruits: [] } 15 16 onSelectionsChange = (selectedFruits) => { 17 // selectedFruits is array of { label, value } 18 this.setState({ selectedFruits }) 19 } 20 21 render () { 22 return ( 23 <View> 24 <SelectMultiple 25 items={fruits} 26 selectedItems={this.state.selectedFruits} 27 onSelectionsChange={this.onSelectionsChange} /> 28 </View> 29 ) 30 } 31} 32export default App 33
Customize label
1import React, { Component } from 'react' 2import { View, Text, Image } from 'react-native' 3import SelectMultiple from 'react-native-select-multiple' 4 5const fruits = ['Apples', 'Oranges', 'Pears'] 6// --- OR --- 7// const fruits = [ 8// { label: 'Apples', value: 'appls' }, 9// { label: 'Oranges', value: 'orngs' }, 10// { label: 'Pears', value: 'pears' } 11// ] 12 13const renderLabel = (label, style) => { 14 return ( 15 <View style={{flexDirection: 'row', alignItems: 'center'}}> 16 <Image style={{width: 42, height: 42}} source={{uri: 'https://dummyimage.com/100x100/52c25a/fff&text=S'}} /> 17 <View style={{marginLeft: 10}}> 18 <Text style={style}>{label}</Text> 19 </View> 20 </View> 21 ) 22} 23 24class App extends Component { 25 state = { selectedFruits: [] } 26 27 onSelectionsChange = (selectedFruits) => { 28 // selectedFruits is array of { label, value } 29 this.setState({ selectedFruits }) 30 } 31 32 render () { 33 return ( 34 <View> 35 <SelectMultiple 36 items={fruits} 37 renderLabel={renderLabel} 38 selectedItems={this.state.selectedFruits} 39 onSelectionsChange={this.onSelectionsChange} /> 40 </View> 41 ) 42 } 43}
Properties
Prop | Default | Type | Description |
---|---|---|---|
items | - | array | All items available in the list (array of string or { label, value } ) |
selectedItems | [] | array | The currently selected items (array of string or { label, value } ) |
onSelectionsChange | - | func | Callback called when a user selects or de-selects an item, passed (selections, item) |
keyExtractor | index | func | keyExtractor for the FlatList |
checkboxSource | image | object | Image source for the checkbox (unchecked). |
selectedCheckboxSource | image | object | Image source for the checkbox (checked). |
flatListProps | {} | object | Additional props for the flat list |
style | default styles | object | Style for the FlatList container. |
rowStyle | default styles | object | Style for the row container. |
checkboxStyle | default styles | object | Style for the checkbox image. |
labelStyle | default styles | object | Style for the text label. |
selectedRowStyle | default styles | object | Style for the row container when selected. |
selectedCheckboxStyle | default styles | object | Style for the checkbox image when selected. |
selectedLabelStyle | default styles | object | Style for the text label when selected. |
renderLabel | null | func | Function for render label. |
maxSelect | null | int | Maximum number of selected items |
Contribute
Feel free to dive in! Open an issue or submit PRs.
License
ISC © TABLEFLIP
A (╯°□°)╯︵TABLEFLIP side project.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENCE:0
- Info: FSF or OSI recognized license: ISC License: LICENCE:0
Reason
Found 7/19 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 18 are checked with a SAST tool
Reason
10 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
Score
2.1
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to react-native-select-multiple
react-native-multiple-select
Simple multi-select component for react-native
react-native-image-crop-picker
Select single or multiple images, with cropping option
react-native-multiple-select-pro
select single, all options
react-native-dropdown-select-list
⭐ React Native Select List Equivalent to Html's Select with options"