cellRangeSelection breaks html `input` components
Pretty straightforward from the title, and example can be shown here -
https://codesandbox.io/s/1853rq1384
Basically, after you have selected a range, and try and click on a text box outside the grid, the input will automatically become unfocused. From what I can tell, it has something to do with the onComplete callback getting triggered any time I click anywhere outside the grid (which, again, only occurs after initially selecting something).
This idea was supported by the fact that you can fix the issue by having cellRangeSelection be based on a boolean field that only gets set to true after the user interacts with the grid. This then caused the cellRangeSelection to neglect calling the onComplete callback. (though that too is another bug).
Here's an example:
https://codesandbox.io/s/zjyy0xp44
I'll make sure to update this issue later this week if I find any implementation details for cellRangeSelection that might be relevant.
Which version of React JS are you using? -> same one as the examples
✅ Officially supported ✅
- [ ] v15.4.x
⚠️ Not officially supported, expect warnings ⚠️
- [ ] v15.5.x
- [ ] v15.6.x
☣️ Not officially supported, expect warnings and errors ☣️
- [ ] v16.x.x
Which browser are you using?
✅ Officially supported ✅
- [ ] IE 9 / IE 10 / IE 11
- [ ] Edge
- [x] Chrome
⚠️ Not officially supported, but "should work" ⚠️
- [x] Firefox
- [ ] Safari
I'm submitting a ...
- [x] 🐛 Bug Report
- [ ] 💡 Feature Request
👋 Need general support? Not sure about how to use React itself, or how to get started with the Grid? Please do not submit support request here. Instead see
https://github.com/adazzle/react-data-grid/blob/master/CONTRIBUTING.md
Issue Details
Please include:
- What the current behavior is
- What the desired behvaior is
- (If Bug) Steps to reproduce the issue
- (If Feature) The motivation / use case for the feature
We especially love screenshots / videos of problems, and remember
The Best Issue Is A Pull Request™
There are 2 PRs with fixture for this issue: https://github.com/adazzle/react-data-grid/pull/1476 https://github.com/adazzle/react-data-grid/pull/1488
I'll make sure to close this once one of those PRs gets put through, thanks!
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.
Hi, @colindjk can you disable stalebot for a while? it closes PR's and issues that are not processed yet.
Hello @colindjk . The issue marked here is relevant to us too. From what it seems, there are 2 PRs with a potential fix for this issue: #1476 #1488
Could you review them and see if they can be merged to fix this?
Hello @colindjk, any news on this?
I have the exact same issue on CHROME browser with: "react-data-grid": "^6.1.0", "react": "^16.8.6",
I think #1698 describes the same bug, at least for me.