[Dialog] Forward refs#14775
Merged
Merged
Conversation
eps1lon
commented
Mar 6, 2019
| onClick={this.handleBackdropClick} | ||
| onMouseDown={this.handleMouseDown} | ||
| role="document" | ||
| data-mui-test="FakeBackdrop" |
Member
Author
There was a problem hiding this comment.
Not happy with that but we need this for testing backdrop related stuff.
eps1lon
commented
Mar 6, 2019
| onEscapeKeyDown={onEscapeKeyDown} | ||
| onClose={onClose} | ||
| hideOnBackdropClick={false} | ||
| hideOnEscapeKeyUp={false} |
Member
Author
There was a problem hiding this comment.
These were renamed previously. Another advantage of mount over shallow.
| assert.strictEqual(paper.hasClass(classes.paper), true); | ||
| }); | ||
|
|
||
| it('should not be open by default', () => { |
Member
Author
There was a problem hiding this comment.
Disregarding that the very next test contradicts this it should be neither by default. open is required.
| assert.strictEqual(wrapper.hasClass('woofDialog'), true); | ||
| }); | ||
|
|
||
| it('should render Fade > div > Paper > children inside the Modal', () => { |
Member
Author
There was a problem hiding this comment.
That test isn't very useful since there a many other intermediary components. This test compounds many other test anyway and can be safely removed.
eps1lon
marked this pull request as ready for review
March 6, 2019 19:42
Details of bundle changes.Comparing: b8a3336...11dd958
|
5 tasks
eps1lon
force-pushed
the
feat/Dialog/forwardRef
branch
2 times, most recently
from
March 7, 2019 11:24
110a8de to
1666dc7
Compare
eps1lon
force-pushed
the
feat/Dialog/forwardRef
branch
from
March 7, 2019 13:27
f1444c7 to
11dd958
Compare
oliviertassinari
approved these changes
Mar 7, 2019
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.
Breaking change
const ref = React.createRef(); <Dialog innerRef={ref} /> - // ref.current points to Dialog instance + // ref.current points to Modal instance which will point to a HTMLElement in the futureContinues #14536