No onCellSelected event fired on the first cell (0,0)
Which version of React JS are you using?
⚠️ Not officially supported, expect warnings ⚠️
- [ ] v15.5.x
- [X ] v15.6.x
Which browser are you using?
✅ Officially supported ✅
- [ X] Chrome
I'm submitting a ...
- [X ] 🐛 Bug Report
Issue Details
- What the current behavior is
In this demo case: https://jsfiddle.net/3su9me5j/2/
Clicking on the first cell, position 0,0, it won't call the onCellSelected handler, not entering in the debugger mode. (With devtools open)
- What the desired behvaior is
Clicking on the first cell, position 0,0, will behave like any other cell, executing onCellSelected function, and entering in the debugger mode (With devtools open)
The problem is that the initial "selected" value is 0,0 https://github.com/adazzle/react-data-grid/blob/master/packages/react-data-grid/src/ReactDataGrid.js#L154
If I assign the value enableCellSelectas false, it works. But it should be true, as I understand.
Hi @dcorb,
thanks for reporting the issue. Good news: It's been fixed in version 3.0.11 :)
Thanks! 💯
I think it doesn't work still, I updated the demo with 3.0.11 https://jsfiddle.net/3su9me5j/5/
That's weird: It works fine for me. I'll try to look into it asap to see what can cause this different behaviour.
Edit: I now see what you mean. the last cell that has been selected keeps the focus even when clicking out of the grid, so focusing on that cell again doesn't trigger the method. I'll reopen the issue and try to work on this asap.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.
Has this been fixed or is there a workaround? We're experiencing this issue currently. Using version 4.0.7
I've tried adding a temporary dom element .focus() and then removing the temporary element, but the problem still persists. Not sure if it's a focus issue or not.