{"action":"created","issue":{"url":"https://api.github.com/repos/react-tools/react-table/issues/1094","repository_url":"https://api.github.com/repos/react-tools/react-table","labels_url":"https://api.github.com/repos/react-tools/react-table/issues/1094/labels{/name}","comments_url":"https://api.github.com/repos/react-tools/react-table/issues/1094/comments","events_url":"https://api.github.com/repos/react-tools/react-table/issues/1094/events","html_url":"https://github.com/react-tools/react-table/issues/1094","id":351189454,"node_id":"MDU6SXNzdWUzNTExODk0NTQ=","number":1094,"title":"Edit a cell within column header group","user":{"login":"rraj9986","id":29253876,"node_id":"MDQ6VXNlcjI5MjUzODc2","avatar_url":"https://avatars0.githubusercontent.com/u/29253876?v=4","gravatar_id":"","url":"https://api.github.com/users/rraj9986","html_url":"https://github.com/rraj9986","followers_url":"https://api.github.com/users/rraj9986/followers","following_url":"https://api.github.com/users/rraj9986/following{/other_user}","gists_url":"https://api.github.com/users/rraj9986/gists{/gist_id}","starred_url":"https://api.github.com/users/rraj9986/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rraj9986/subscriptions","organizations_url":"https://api.github.com/users/rraj9986/orgs","repos_url":"https://api.github.com/users/rraj9986/repos","events_url":"https://api.github.com/users/rraj9986/events{/privacy}","received_events_url":"https://api.github.com/users/rraj9986/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-16T12:44:54Z","updated_at":"2018-10-04T20:01:17Z","closed_at":"2018-10-04T20:01:17Z","author_association":"NONE","body":"I have data as below:\r\n\r\n```\r\ndata: [\r\n                {\r\n                    clone: \"001\",\r\n                    Rate: [\r\n                        {\r\n                            _bracket_one: \"$10\",\r\n                            _bracket_two: \"$9\",\r\n                            _bracket_three: \"$8\"\r\n                        }\r\n                    ]\r\n                }\r\n]\r\n```\r\nI have defined the columns as below:\r\n```\r\n[\r\n{\r\n                Header: 'CLONE',\r\n                accessor: 'clone',\r\n            },\r\n            {\r\n                Header: 'RATES',\r\n                accessor: 'Rate',\r\n                columns: [\r\n                    {\r\n                        Header: '10K',\r\n                        accessor: 'Rate[0]._bracket_one',\r\n                        Cell: this.renderEditable,\r\n                    },\r\n                    {\r\n                        Header: '20K',\r\n                        accessor: 'Rate[0]._bracket_two',\r\n                        Cell: this.renderEditable,\r\n                    },\r\n                    {\r\n                        Header: '30K',\r\n                        accessor: 'freightRate[0]._bracket_three',\r\n                        Cell: this.renderEditable,\r\n                    }\r\n                ]\r\n            }\r\n]\r\n```\r\nMy renderEditable function:\r\n\r\n```\r\nrenderEditable(cellInfo) {\r\n        console.log(cellInfo)\r\n        return (\r\n            <div\r\n                style={{ backgroundColor: \"#fafafa\" }}\r\n                contentEditable\r\n                suppressContentEditableWarning\r\n                onBlur={e => {\r\n                    const data = [...this.state.data];\r\n                    data[cellInfo.index][cellInfo.column.id] = e.target.innerHTML;\r\n                    this.setState({ data });\r\n                }}\r\n                dangerouslySetInnerHTML={{\r\n                    __html: this.state.data[cellInfo.index][cellInfo.column.id]\r\n                }}\r\n            />\r\n        );\r\n    }\r\n```\r\n\r\nWhen I am making the columns editable, no value is getting populated. If I am trying to edit the field, in the data object, a new entry is getting created instead of editing the actual value. i am not getting any example for such a scenario. Please help"},"comment":{"url":"https://api.github.com/repos/react-tools/react-table/issues/comments/427150336","html_url":"https://github.com/react-tools/react-table/issues/1094#issuecomment-427150336","issue_url":"https://api.github.com/repos/react-tools/react-table/issues/1094","id":427150336,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzE1MDMzNg==","user":{"login":"tannerlinsley","id":5580297,"node_id":"MDQ6VXNlcjU1ODAyOTc=","avatar_url":"https://avatars0.githubusercontent.com/u/5580297?v=4","gravatar_id":"","url":"https://api.github.com/users/tannerlinsley","html_url":"https://github.com/tannerlinsley","followers_url":"https://api.github.com/users/tannerlinsley/followers","following_url":"https://api.github.com/users/tannerlinsley/following{/other_user}","gists_url":"https://api.github.com/users/tannerlinsley/gists{/gist_id}","starred_url":"https://api.github.com/users/tannerlinsley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannerlinsley/subscriptions","organizations_url":"https://api.github.com/users/tannerlinsley/orgs","repos_url":"https://api.github.com/users/tannerlinsley/repos","events_url":"https://api.github.com/users/tannerlinsley/events{/privacy}","received_events_url":"https://api.github.com/users/tannerlinsley/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T20:01:17Z","updated_at":"2018-10-04T20:01:17Z","author_association":"COLLABORATOR","body":"This feature/issue has been tagged as one that will likely be fixed or improved in the next major release of React-Table. This release is expected to be completed in the next 6 - 8 months. Please see #1143 for more detail. If you believe this feature can be easily fixed, we invite you to fork the project, attempt the fix, and use it until the latest version is available. If the fix is simple enough, we will also consider it as a PR to the current version."}}
{"actor":{"display_login":"tannerlinsley"}}