Skip to content

Commit ae8092f

Browse files
author
Bhavesh Goyal
committed
fix
1 parent 0fa4b0a commit ae8092f

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
7777
unCheckedComponent | PropTypes.element | true | Icon | Custom unchecked Component
7878
isChecked | PropTypes.bool | false | false | checkbox checked state
7979
onClick | 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
8181
disabled | PropTypes.bool | true | false | Disable the checkbox button
8282
checkBoxColor | PropTypes.string | true | | Tint color of the checkbox image (this props is for both checked and unchecked state)
8383
checkedCheckBoxColor | PropTypes.string | true | | Tint color of the checked state checkbox image (this prop will override value of `checkBoxColor` for checked state)

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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": {
@@ -12,6 +12,7 @@
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",

0 commit comments

Comments
 (0)