2.0.2 • Published 5 years ago

react-native-picker-checkbox v2.0.2

Weekly downloads
20
License
Apache 2.0
Repository
github
Last release
5 years ago

react-native-picker-checkbox

A simple picker component with checkbox list for React-Native.

npm version npm

Contents

ui3 ui4

Example

$ cd example
$ npm i
$ react-native run-ios   // For ios
$ react-native run-android   // For Android

Installation

npm install react-native-picker-checkbox --save

Usage

  import PickerCheckBox from 'react-native-picker-checkbox';

  handleConfirm(pItems){
    console.log('pItems =>', pItems);
  }

  const items = [
    {
      itemKey:1,
      itemDescription:'Item 1'
      },
    {
      itemKey:2,
      itemDescription:'Item 2'
      },
    {
      itemKey:3,
      itemDescription:'Item 3'
      }
  ];

  render() {
    return(
      <PickerCheckBox
        data={items}
        headerComponent={<Text style={{fontSize:25}} >items</Text>}
        OnConfirm={(pItems) => this.handleConfirm(pItems)}
        ConfirmButtonTitle='OK'
        DescriptionField='itemDescription'
        KeyField='itemKey'
        placeholder='select some items'
        arrowColor='#FFD740'
        arrowSize={10}
        placeholderSelectedItems ='$count selected item(s)'
        />
    )
  }

Properties

NameTypeDescriptionDefaultOptional
dataarrayJson with id and descriptionnullfalse
headerComponentcomponentHeader componentnulltrue
ConfirmButtonTitleStringconfirm button's titleconfirmtrue
DescriptionFieldstringDescription Field of data objectnullfalse
KeyFieldstringkey Fieldnullfalse
placeholderstringThe text that will be rendered before items has been selectednulltrue
containerStyleobjectpicker container stylenulltrue
arrowColorstringArrow Color#000true
arrowSizenumberArrow Size8true
dividerColorstringDivider Color#EEEEEEtrue
dividerVisiblebooleanDivision between header and contenttruetrue
placeholderSelectedItemsstringPlaceholder when there is selected item
checkedItemsJSONitems checked that will show when open the pickernulltrue

Contributing

If you'd like to see something added or changed to this module please open a new GitHub issue. Pull requests are always welcome.

License

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.9

5 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago