1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Fixed note order in RN

This commit is contained in:
Laurent Cozic
2017-07-15 19:13:31 +01:00
parent 62c9a66c47
commit 93791f1e46
6 changed files with 56 additions and 3 deletions

View File

@ -23,6 +23,12 @@ class Checkbox extends Component {
this.state = { checked: this.props.checked };
}
componentWillReceiveProps(newProps) {
if ('checked' in newProps) {
this.setState({ checked: newProps.checked });
}
}
onPress() {
let newChecked = !this.state.checked;
this.setState({ checked: newChecked });