-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[core] feat(Dialog): add containerRef prop #5314
Conversation
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.
Please add a unit test. You should be able to add a test for this in core/test/dialog/dialogTests.tsx... something like:
it("supports ref objects attached to container", () => {
const containerRef = React.createRef<HTMLDivElement>();
mount(
<Dialog containerRef={containerRef} usePortal={false}>
body
</Dialog>,
);
assert.isTrue(containerRef.current?.classList.contains(Classes.DIALOG_CONTAINER));
});
Co-authored-by: Adi Dahiya <adi.dahiya14@gmail.com>
Merging in changes to dlichen/blueprint
…t locally currently
added the test, but still need to test locally. can't seem to figure out yarn test. can hold off on reviewing |
Fixes #5273
Checklist
Changes proposed in this pull request:
Adds a ref prop to dialog.
Reviewers should focus on:
I'm not entirely sure if this is the correct approach, also not completely sure how to test, so any feedback is welcomed.
Screenshot
n/a