react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

cellRangeSelection breaks html `input` components

Open colindjk opened this issue 7 years ago • 8 comments

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™

colindjk avatar Mar 20 '19 06:03 colindjk

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

szogun1987 avatar Mar 20 '19 15:03 szogun1987

I'll make sure to close this once one of those PRs gets put through, thanks!

colindjk avatar Mar 25 '19 13:03 colindjk

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.

stale[bot] avatar Apr 24 '19 13:04 stale[bot]

Hi, @colindjk can you disable stalebot for a while? it closes PR's and issues that are not processed yet.

szogun1987 avatar May 02 '19 11:05 szogun1987

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?

K4rolisV avatar Jul 19 '19 08:07 K4rolisV

Hello @colindjk, any news on this?

K4rolisV avatar Jul 25 '19 07:07 K4rolisV

I have the exact same issue on CHROME browser with: "react-data-grid": "^6.1.0", "react": "^16.8.6",

faizrktm avatar Jul 31 '19 02:07 faizrktm

I think #1698 describes the same bug, at least for me.

Gitii avatar Aug 08 '19 12:08 Gitii