Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavesh Goyal committed Jun 27, 2018
1 parent 0fa4b0a commit ae8092f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# react-native-checkbox-component

[ ![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)
[ ![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)
[ ![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)
[ ![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)
[ ![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen.svg)](https://github.com/bgoyal2222/react-native-checkbox-component/pulls)
[![License MIT](http://img.shields.io/badge/license-MIT-orange.svg?style=flat)](https://github.com/bgoyal2222/react-native-checkbox-component/blob/master/LICENSE)

Expand Down Expand Up @@ -77,7 +77,7 @@ checkedComponent | PropTypes.element | true | Icon | Custom checked Compone
unCheckedComponent | PropTypes.element | true | Icon | Custom unchecked Component
isChecked | PropTypes.bool | false | false | checkbox checked state
onClick | PropTypes.func | false | | callback function
key | PropTypes.number |false| |key to return in onClick callback
index | PropTypes.number |false| |key to return in onClick callback
disabled | PropTypes.bool | true | false | Disable the checkbox button
checkBoxColor | PropTypes.string | true | | Tint color of the checkbox image (this props is for both checked and unchecked state)
checkedCheckBoxColor | PropTypes.string | true | | Tint color of the checked state checkbox image (this prop will override value of `checkBoxColor` for checked state)
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class CheckBox extends Component {
checkedCheckBoxColor: PropTypes.string,
uncheckedCheckBoxColor: PropTypes.string,
disabled: PropTypes.bool,
key:PropTypes.number
index:PropTypes.number
}
static defaultProps = {
isChecked: false,
Expand All @@ -63,7 +63,7 @@ export default class CheckBox extends Component {
this.setState({
isChecked: checkboxState
})
this.props.onClick(checkboxState,this.props.key);
this.props.onClick(checkboxState,this.props.index);
}
_renderLeft() {
if (this.props.leftTextView) return this.props.leftTextView;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-checkbox-component",
"version": "1.0.2",
"version": "1.0.3",
"description": "Custom checkbox component for react native, it works on iOS and Android like a charm.",
"main": "index.js",
"scripts": {
Expand All @@ -12,6 +12,7 @@
},
"keywords": [
"react-native",
"react-native-checkbox-component",
"react-native-custom-check-box",
"react-native-component",
"react-native-checkbox",
Expand Down

0 comments on commit ae8092f

Please sign in to comment.