Skip to content

Latest commit

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

react-native-select-multiple dependencies Status

A customiseable ListView that allows you to select multiple rows.

select-multiple

Example

importReact,{Component}from'react'import{View}from'react-native'importSelectMultiplefrom'react-native-select-multiple'constfruits=['Apples','Oranges','Pears']// --- OR ---// const fruits = [// { label: 'Apples', value: 'appls' },// { label: 'Oranges', value: 'orngs' },// { label: 'Pears', value: 'pears' }// ]classAppextendsComponent{state={selectedFruits: []}onSelectionsChange=(selectedFruits)=>{// selectedFruits is array of { label, value }this.setState({ selectedFruits })}render(){return(<View><SelectMultipleitems={fruits}selectedItems={this.state.selectedFruits}onSelectionsChange={this.onSelectionsChange}/></View>)}}

Properties

PropDefaultTypeDescription
items-arrayAll items available in the list (array of string or { label, value })
selectedItems[]arrayThe currently selected items (array of string or { label, value })
onSelectionsChange-funcCallback called when a user selects or de-selects an item, passed (selections, item)
checkboxSourceimageobjectImage source for the checkbox (unchecked).
selectedCheckboxSourceimageobjectImage source for the checkbox (checked).
listViewProps{}objectAdditional props for the list view
styledefault stylesobjectStyle for the ListView container.
rowStyledefault stylesobjectStyle for the row container.
checkboxStyledefault stylesobjectStyle for the checkbox image.
labelStyledefault stylesobjectStyle for the text label.
selectedRowStyledefault stylesobjectStyle for the row container when selected.
selectedCheckboxStyledefault stylesobjectStyle for the checkbox image when selected.
selectedLabelStyledefault stylesobjectStyle for the text label when selected.

A (╯°□°)╯︵TABLEFLIP side project.

js-standard-style

About

A customiseable ListView that allows you to select multiple rows

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages