{"action":"created","issue":{"url":"https://api.github.com/repos/crazycodeboy/react-native-check-box/issues/15","repository_url":"https://api.github.com/repos/crazycodeboy/react-native-check-box","labels_url":"https://api.github.com/repos/crazycodeboy/react-native-check-box/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/crazycodeboy/react-native-check-box/issues/15/comments","events_url":"https://api.github.com/repos/crazycodeboy/react-native-check-box/issues/15/events","html_url":"https://github.com/crazycodeboy/react-native-check-box/issues/15","id":223819281,"number":15,"title":"dinamicaly change the status of checked","user":{"login":"joaosauer","id":16062808,"avatar_url":"https://avatars2.githubusercontent.com/u/16062808?v=3","gravatar_id":"","url":"https://api.github.com/users/joaosauer","html_url":"https://github.com/joaosauer","followers_url":"https://api.github.com/users/joaosauer/followers","following_url":"https://api.github.com/users/joaosauer/following{/other_user}","gists_url":"https://api.github.com/users/joaosauer/gists{/gist_id}","starred_url":"https://api.github.com/users/joaosauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaosauer/subscriptions","organizations_url":"https://api.github.com/users/joaosauer/orgs","repos_url":"https://api.github.com/users/joaosauer/repos","events_url":"https://api.github.com/users/joaosauer/events{/privacy}","received_events_url":"https://api.github.com/users/joaosauer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-24T13:25:35Z","updated_at":"2017-04-26T13:10:07Z","closed_at":null,"body":"Hi,\r\n\r\nI'm trying to dinamically change the status of the checkBox, because I want to have one checkBox that we can call \"Check All\", and as the name says, it will change all the status of the children checkbox to true or false, depending on what this one is set.\r\nI made the code but, when I change the state of the checked object, the screen is not updating the children Checkbox to what was suppose to be(I can confirm that the status was changing using the logs).\r\nIt this not yet implemented, or is it a bug or I'm doing something wrong? (I'm using version 1.0.4)\r\nCode:\r\n```\r\nexport default class MainScreen extends React.Component {\r\n    constructor(props) {\r\n        super(props);\r\n\r\n        this.ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1.id !== r2.id});\r\n        this.state = {\r\n            list: [],\r\n            dataSource: this.ds.cloneWithRows([]),\r\n            check: {},\r\n            checkAll: false,\r\n        };\r\n    }\r\n\r\n    static navigationOptions = {\r\n        title: 'Main',\r\n        headerVisible: false\r\n    };\r\n\r\n    _checkAll = () => {\r\n\t\tconst { checkAll, list, check } = this.state;\r\n\t\tconst callback = () => {\r\n\t\t  console.log(\"checkAll\", checkAll);\r\n\t\t  list.map(student => {\r\n\t\t\t  check[student.name].checked = !check[student.name].checked;\r\n\t\t\t  console.log(\"check: \" + student.name, check[student.name].checked);\r\n\t\t\t  this.setState({check});\r\n\t\t  });\r\n\t\t}\r\n\t\tthis.setState({checkAll: !this.state.checkAll}, callback);\r\n    }\r\n    \r\n    _checkStudent = (student) => {\r\n\t\tconsole.log(\"checking student\", student);\r\n\t\tconst { check } = this.state;\r\n\t\tconsole.log(\"checking check\", check);\r\n\t\tcheck[student.name].checked = !check[student.name].checked;\r\n\t\tthis.setState({check});\r\n    }\r\n\r\n    render() {\r\n        // const { navigate } = this.props.navigation;\r\n        const { check, checkAll, dataSource } = this.state;\r\n        return (\r\n            <Image source={require('./../images/background_no_logo.png')} style={styles.container}>\r\n\t\t\t\t<CheckBox\r\n\t\t\t\t\tstyle={{padding: 10}}\r\n\t\t\t\t\tonClick={()=>this._checkAll()}\r\n\t\t\t\t\tisChecked={this.state.checkAll}\r\n\t\t\t\t\trightText={this.text.checkText}\r\n\t\t\t\t/>\r\n\t\t\t\t<ListView\r\n\t\t\t\t   style={styles.listView}\r\n\t\t\t\t   dataSource={this.state.dataSource}\r\n\t\t\t\t   enableEmptySections={true}\r\n\t\t\t\t   renderRow={(student) =>\r\n\t\t\t\t\t   <View  style={styles.row}>\r\n\t\t\t\t\t\t   <CheckBox\r\n\t\t\t\t\t\t\t   style={{paddingLeft: 10, paddingRight:10}}\r\n\t\t\t\t\t\t\t   onClick={() => this._checkStudent(this.state.check[student.name])}\r\n\t\t\t\t\t\t\t   isChecked={this.state.check[student.name].checked}\r\n\t\t\t\t\t\t   />\r\n\t\t\t\t\t\t   <Text style={{color:'#336463', fontSize:20, flex: 1}}>\r\n\t\t\t\t\t\t\t   {`${student.name}`}\r\n\t\t\t\t\t\t   </Text>\r\n\t\t\t\t\t   </View>\r\n\t\t\t\t   }\r\n\t\t\t\t/>\r\n            </Image>\r\n        )\r\n    }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/crazycodeboy/react-native-check-box/issues/comments/297402069","html_url":"https://github.com/crazycodeboy/react-native-check-box/issues/15#issuecomment-297402069","issue_url":"https://api.github.com/repos/crazycodeboy/react-native-check-box/issues/15","id":297402069,"user":{"login":"rahulmishra-goibibo","id":20772089,"avatar_url":"https://avatars1.githubusercontent.com/u/20772089?v=3","gravatar_id":"","url":"https://api.github.com/users/rahulmishra-goibibo","html_url":"https://github.com/rahulmishra-goibibo","followers_url":"https://api.github.com/users/rahulmishra-goibibo/followers","following_url":"https://api.github.com/users/rahulmishra-goibibo/following{/other_user}","gists_url":"https://api.github.com/users/rahulmishra-goibibo/gists{/gist_id}","starred_url":"https://api.github.com/users/rahulmishra-goibibo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahulmishra-goibibo/subscriptions","organizations_url":"https://api.github.com/users/rahulmishra-goibibo/orgs","repos_url":"https://api.github.com/users/rahulmishra-goibibo/repos","events_url":"https://api.github.com/users/rahulmishra-goibibo/events{/privacy}","received_events_url":"https://api.github.com/users/rahulmishra-goibibo/received_events","type":"User","site_admin":false},"created_at":"2017-04-26T13:10:07Z","updated_at":"2017-04-26T13:10:07Z","body":"i am facing the same problem. Exactly the same issue that the children checkbox are not getting updated. Any help would be appreciated."}}
{"actor":{"display_login":"rahulmishra-goibibo"}}