Skip to content
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

[Feature Request] Optional prop to render only one child at a time #225

Open
haxxxton opened this issue May 27, 2019 · 0 comments
Open

[Feature Request] Optional prop to render only one child at a time #225

haxxxton opened this issue May 27, 2019 · 0 comments

Comments

@haxxxton
Copy link

Currently react-portal appends subsequent portal'ed content into the same element. This means that you can 'portal' multiple elements at once. However, occasionally you want to manage this such that only a single child is rendered at a time. and that triggering the render of a new child, closes any that may be open. My use case for this is hoverable tooltips; i find that sometimes the onMouseLeave event is not always fired if moving quickly, and allows the user to spawn many tooltips at once.

Suggested prop name would be something like closeOtherChildren or closeOthersOnOpen or orphanMode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant