[change] deprecate getParentElement in favor of local element.#440
Open
diasbruno wants to merge 1 commit intoreactjs:masterfrom
Open
[change] deprecate getParentElement in favor of local element.#440diasbruno wants to merge 1 commit intoreactjs:masterfrom
diasbruno wants to merge 1 commit intoreactjs:masterfrom
Conversation
75c4ba2 to
efb0954
Compare
1 similar comment
efb0954 to
376c4e6
Compare
1 similar comment
376c4e6 to
c5b148d
Compare
1 similar comment
|
Hi! Any plan to get this merged in the short term? |
Collaborator
Author
|
Hi @adrianq, I don't know, I believe it still needs some tests and It's also a breaking change, so I'm not sure. |
Collaborator
Author
|
If you have some time you can review this PR. :) |
This patch will give us the ability to place the modal in any place in the react tree. Each modal can handle its own clean up. Test case was written by @restrry [b9a3415](https://github.com/restrry/react-modal/commit/b9a34155bf37298e99922f77dec8e27292db06d9).
c5b148d to
4d2ff12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To keep things simple, each Modal can be placed on any level
of the react's tree and it will do a proper clean up when it's
time to unmount the component. Also, it make things simple enough
to deal with overlapped modal.
It will use a local element, created by which will still be visible by
getting
nodeproperty.Changes proposed:
divprovided by the instance of to setup things.<Modal />can perform its own clean up.Upgrade Path (for changed or removed APIs):
getParentElement.Acceptance Checklist:
CONTRIBUTING.md.