Skip to content

ricardo93borges/rn-multiselect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RN Multiselect

npm version

Multiselect component for react native

Install

npm i rn-multiselect

Usage

<MultiSelect
  data={[{key:1, label:'Option 1'}, {key:2, label:'Option 2'}, {key:3, label:'Option 3' } ]}
  selectedOptions={[1,2]}
  onChange={values => this.setState({ selectedOptions: values })}
  modalFooterText="Submit"
  placeholder="Click here to choose"
  displayOptionsLimit={5}
/>








Props
  • data (required): Options, expect an array of objects with key and label
  • selectedOptions: Selected options, expect an array of selected options's keys
  • onChange: Function that is called when a option is selected, returns selected options
  • modalFooterText: Text displayed on modal's footer
  • placeholder: Text displayed when there is no tag selected
  • displayOptionsLimit: Limit of selected options displayed, default is 2.

About

Multiselect component for react native

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published