You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-native-select-multiple

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-select-multiple - npm Package Compare versions

Comparing version

to
2.1.0

.travis.yml

2

package.json
{
"name": "react-native-select-multiple",
"version": "2.0.1",
"version": "2.1.0",
"description": "A customiseable ListView that allows you to select multiple rows",

@@ -5,0 +5,0 @@ "main": "src/SelectMultiple.js",

# react-native-select-multiple
[![Build Status](https://travis-ci.org/tableflip/react-native-select-multiple.svg?branch=master)](https://travis-ci.org/tableflip/react-native-select-multiple)
[![dependencies Status](https://david-dm.org/tableflip/react-native-select-multiple/status.svg)](https://david-dm.org/tableflip/react-native-select-multiple)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

@@ -120,2 +122,3 @@ > A customiseable FlatList that allows you to select multiple rows.

| renderLabel | null | `func` | Function for render label. |
| maxSelect | null | `int` | Maximum number of selected items|

@@ -133,3 +136,1 @@ ## Contribute

A [(╯°□°)╯︵TABLEFLIP](https://tableflip.io) side project.
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

@@ -27,3 +27,3 @@ import React, { Component } from 'react'

selectedItems: PropTypes.arrayOf(itemType),
maxSelect: PropTypes.number,
onSelectionsChange: PropTypes.func.isRequired,

@@ -53,2 +53,3 @@ keyExtractor: PropTypes.func,

labelStyle: {},
maxSelect: null,
checkboxSource: checkbox,

@@ -61,3 +62,2 @@ selectedCheckboxSource: checkboxChecked,

super(props)
this.state = { dataSource: [] }

@@ -89,3 +89,3 @@ }

const { label, value } = row
let { selectedItems } = this.props
let { selectedItems, maxSelect } = this.props

@@ -99,3 +99,7 @@ selectedItems = (selectedItems || []).map(this.toLabelValueObject)

} else {
selectedItems = selectedItems.concat({ label, value })
if (maxSelect != null && selectedItems.length >= maxSelect) {
return
} else {
selectedItems = selectedItems.concat({ label, value })
}
}

@@ -102,0 +106,0 @@