I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/adazzle/react-data-grid/blob/master/CONTRIBUTING.md
Current behavior
When editing a cell that uses the CheckboxEditor, the above error appears and the checkbox becomes unresponsive.
Expected/desired behavior
No errors, everything is awesome
Reproduction of the problem
var columns = [{
key: 'cool',
name: 'cool',
editable: true,
editor: <Plugins.Editors.CheckboxEditor />
}];
var rowGetter = function() { return {'cool': true}; };
var rowsCount = 1;
ReactDOM.render(<ReactDataGrid
enableCellSelect={true}
height={"700"}
columns={columns},
rowGetter={rowGetter}
rowsCount={rowsCount}
/>, mountNode);
Hi @SupernaviX, that editor is not documented well enough, it shouldn't be called an editor in the first place as it is sort of a quick edit formatter.
As you can check in here that component requires a onCellChange handler and it just edits the value inside the checkbox without need to open the editor.
You can check a real use case in here.
Good to know, I'll update my typings to reflect that.
Unfortunately, it still lack of documentation or examples for this CheckboxEditor 馃槥
Most helpful comment
Hi @SupernaviX, that editor is not documented well enough, it shouldn't be called an editor in the first place as it is sort of a quick edit formatter.
As you can check in here that component requires a
onCellChangehandler and it just edits the value inside the checkbox without need to open the editor.You can check a real use case in here.