File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11# react-native-checkbox-component
22
3- [ ![ release] ( https://img.shields.io/badge/release-v1.0.2 -blue.svg?maxAge=2592000?style=flat-square )] ( https://github.com/bgoyal2222/react-native-checkbox-component/releases )
4- [ ![ NPM version] ( https://img.shields.io/badge/npm%20package-v1.0.2 -green.svg?style=flat )] ( https://www.npmjs.com/package/react-native-checkbox-component )
3+ [ ![ release] ( https://img.shields.io/badge/release-v1.0.3 -blue.svg?maxAge=2592000?style=flat-square )] ( https://github.com/bgoyal2222/react-native-checkbox-component/releases )
4+ [ ![ NPM version] ( https://img.shields.io/badge/npm%20package-v1.0.3 -green.svg?style=flat )] ( https://www.npmjs.com/package/react-native-checkbox-component )
55[ ![ PRs Welcome] ( https://img.shields.io/badge/PRs-Welcome-brightgreen.svg )] ( https://github.com/bgoyal2222/react-native-checkbox-component/pulls )
66[ ![ License MIT] ( http://img.shields.io/badge/license-MIT-orange.svg?style=flat )] ( https://github.com/bgoyal2222/react-native-checkbox-component/blob/master/LICENSE )
77
@@ -77,7 +77,7 @@ checkedComponent | PropTypes.element | true | Icon | Custom checked Compone
7777unCheckedComponent | PropTypes.element | true | Icon | Custom unchecked Component
7878isChecked | PropTypes.bool | false | false | checkbox checked state
7979onClick | PropTypes.func | false | | callback function
80- key | PropTypes.number |false| |key to return in onClick callback
80+ index | PropTypes.number |false| |key to return in onClick callback
8181disabled | PropTypes.bool | true | false | Disable the checkbox button
8282checkBoxColor | PropTypes.string | true | | Tint color of the checkbox image (this props is for both checked and unchecked state)
8383checkedCheckBoxColor | PropTypes.string | true | | Tint color of the checked state checkbox image (this prop will override value of ` checkBoxColor ` for checked state)
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export default class CheckBox extends Component {
4242 checkedCheckBoxColor : PropTypes . string ,
4343 uncheckedCheckBoxColor : PropTypes . string ,
4444 disabled : PropTypes . bool ,
45- key :PropTypes . number
45+ index :PropTypes . number
4646 }
4747 static defaultProps = {
4848 isChecked : false ,
@@ -63,7 +63,7 @@ export default class CheckBox extends Component {
6363 this . setState ( {
6464 isChecked : checkboxState
6565 } )
66- this . props . onClick ( checkboxState , this . props . key ) ;
66+ this . props . onClick ( checkboxState , this . props . index ) ;
6767 }
6868 _renderLeft ( ) {
6969 if ( this . props . leftTextView ) return this . props . leftTextView ;
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-checkbox-component" ,
3- "version" : " 1.0.2 " ,
3+ "version" : " 1.0.3 " ,
44 "description" : " Custom checkbox component for react native, it works on iOS and Android like a charm." ,
55 "main" : " index.js" ,
66 "scripts" : {
1212 },
1313 "keywords" : [
1414 " react-native" ,
15+ " react-native-checkbox-component" ,
1516 " react-native-custom-check-box" ,
1617 " react-native-component" ,
1718 " react-native-checkbox" ,
You can’t perform that action at this time.
0 commit comments