{"action":"created","issue":{"url":"https://api.github.com/repos/adazzle/react-data-grid/issues/254","repository_url":"https://api.github.com/repos/adazzle/react-data-grid","labels_url":"https://api.github.com/repos/adazzle/react-data-grid/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/adazzle/react-data-grid/issues/254/comments","events_url":"https://api.github.com/repos/adazzle/react-data-grid/issues/254/events","html_url":"https://github.com/adazzle/react-data-grid/issues/254","id":142892366,"number":254,"title":"Cell values not changing on global state update","user":{"login":"sawan","id":159342,"avatar_url":"https://avatars.githubusercontent.com/u/159342?v=3","gravatar_id":"","url":"https://api.github.com/users/sawan","html_url":"https://github.com/sawan","followers_url":"https://api.github.com/users/sawan/followers","following_url":"https://api.github.com/users/sawan/following{/other_user}","gists_url":"https://api.github.com/users/sawan/gists{/gist_id}","starred_url":"https://api.github.com/users/sawan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sawan/subscriptions","organizations_url":"https://api.github.com/users/sawan/orgs","repos_url":"https://api.github.com/users/sawan/repos","events_url":"https://api.github.com/users/sawan/events{/privacy}","received_events_url":"https://api.github.com/users/sawan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-23T08:11:44Z","updated_at":"2016-03-24T00:39:08Z","closed_at":"2016-03-24T00:39:08Z","body":"Hi,\r\n\r\nI am trying to render each cell of the grid as a check box using a custom formatter. If the user ticks the check box, I want all **cells**  in the whole grid with the same value to update and show up as checked. \r\n\r\nA call back is dispatched and I can verify that the Redux store is doing the right thing and updating global state correctly; state is propagating back to the parent grid component. Parent grid component is a functional component and hence ```render``` should be run every time data updates.  \r\n\r\nHowever, the changes are not getting reflected back into the grid.\r\n\r\nAm I missing something?\r\n\r\n```javascript\r\n\r\nimport React, { PropTypes } from 'react'\r\nimport ReactDataGrid from 'react-data-grid'\r\n\r\nvar ColumnFormatter = React.createClass({\r\n\r\n    propTypes: {\r\n        updateSelectedState: PropTypes.func.isRequired\r\n    },\r\n\r\n    getInitialState: function (){\r\n        return {\r\n            cell_value: this.props.value.element,\r\n            cell_checked: this.props.value.selected\r\n        }\r\n    },\r\n\r\n    render: function(){\r\n        return(\r\n            <div>\r\n                <input type=\"checkbox\"\r\n                       value={this.state.cell_value}\r\n                       name={this.state.cell_value}\r\n                       checked={this.state.cell_checked||this.props.cell_checked}\r\n                       onChange={this.props.updateSelectedState}\r\n                />\r\n                &nbsp;&nbsp;&nbsp;\r\n                {this.state.cell_value}\r\n            </div>\r\n        )}\r\n})\r\n\r\nfunction columns(changeFunc){\r\n    var cf = <ColumnFormatter updateSelectedState={changeFunc} />\r\n    var cols = [\r\n        {key: 'column_header', name: 'Column Header', formatter: cf},\r\n        {key: 'column_sub_header', name: 'Column Sub Header', formatter: cf},\r\n        {key: 'row_header', name: 'Row Header', formatter: cf},\r\n        {key: 'row_sub_header', name: 'Row Sub Header', formatter: cf}\r\n    ]\r\n\r\n    return cols\r\n}\r\n\r\n\r\nconst ContentDataTableComponent = ({contentData, onCellChange}) => (\r\n    <div>\r\n        <br/>\r\n        <ReactDataGrid\r\n            rowKey='column_header'\r\n            columns={columns(onCellChange)}\r\n            rowGetter={(i) =>  contentData[i] }\r\n            rowsCount={contentData.length}\r\n            minHeight={300}\r\n        />\r\n    </div>\r\n)\r\n\r\nContentDataTableComponent.propTypes = {\r\n    contentData: React.PropTypes.array.isRequired,\r\n    onCellChange: PropTypes.func.isRequired\r\n}\r\n\r\nexport default ContentDataTableComponent\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/adazzle/react-data-grid/issues/comments/200597817","html_url":"https://github.com/adazzle/react-data-grid/issues/254#issuecomment-200597817","issue_url":"https://api.github.com/repos/adazzle/react-data-grid/issues/254","id":200597817,"user":{"login":"sawan","id":159342,"avatar_url":"https://avatars.githubusercontent.com/u/159342?v=3","gravatar_id":"","url":"https://api.github.com/users/sawan","html_url":"https://github.com/sawan","followers_url":"https://api.github.com/users/sawan/followers","following_url":"https://api.github.com/users/sawan/following{/other_user}","gists_url":"https://api.github.com/users/sawan/gists{/gist_id}","starred_url":"https://api.github.com/users/sawan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sawan/subscriptions","organizations_url":"https://api.github.com/users/sawan/orgs","repos_url":"https://api.github.com/users/sawan/repos","events_url":"https://api.github.com/users/sawan/events{/privacy}","received_events_url":"https://api.github.com/users/sawan/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T00:39:08Z","updated_at":"2016-03-24T00:39:08Z","body":"Solved: problem was incorrect use of `state` -- should be using `props`\r\n\r\n```javascript\r\nconst ColumnFormatter = ({value, updateSelectedState}) => (\r\n            <div>\r\n                <input type=\"checkbox\"\r\n                       value={value.element}\r\n                       name={value.element}\r\n                       checked={value.selected}\r\n                       onChange={updateSelectedState}\r\n                />\r\n                &nbsp;&nbsp;&nbsp;\r\n                {value.element}\r\n            </div>\r\n)\r\n```"}}