-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DataGrid] Ignore event from portal in cells #1324
[DataGrid] Ignore event from portal in cells #1324
Conversation
it should be ok to have the event bubble to the grid container. |
I will add a regression test case if we agree with the approach. I didn't dive too much into the codebase, to try to find other events subscribed. What I did instead of click/key around to find any wrong behavior, couldn't spot any. |
We should probably link the React issue in the comment, for context. |
I will wait for @dtassone to come back before continue the effort in the issue. |
You should add a test for renderCell, and portals to make sure it works as expected but the approach looks correct |
Ok, will do such |
30b3272
to
d204dc2
Compare
@dtassone done |
@@ -57,4 +63,30 @@ describe('<DataGrid /> - Rows', () => { | |||
expect(getColumnValues()).to.deep.equal(['Mike-11', 'Jack-11', 'Mike-20']); | |||
}); | |||
}); | |||
|
|||
it('should ignore events coming from a portal in the cell', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we have a test that shows events from a rendercell without portal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well you check that the event is blocked with portal. I don't think we have a test that check if the event go through without portal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I can add test coverage for this case.
d204dc2
to
e547bd2
Compare
The React's issue: facebook/react#11387. |
Closes #1295.
Closes #1305.
This seems to cover all the issues. Assuming we will never add another source, maybe it's enough? Opened as a draft to run the CI and collect feedback.