-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Modal] Add TransitionHandlers to Modal props TypeScript definitions #9723
Conversation
src/Modal/Modal.d.ts
Outdated
|
||
export interface ModalProps | ||
extends StandardProps< | ||
React.HtmlHTMLAttributes<HTMLDivElement> & Partial<PortalProps>, | ||
React.HtmlHTMLAttributes<HTMLDivElement> & Partial<PortalProps> & Partial<TransitionHandlers>, |
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.
The properties aren't implemented on the component. Should we move it to the dependents (Drawer, Dialog, Snackbar, Popover?
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.
The properties used to be in ModalProps, but if the actual implementation is in the dependents I'd say it's more appropriate to move them there. Should I?
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.
Yes, please.
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.
Some dependents (Popover, Snackbar) still had the TransitionHandlers props so I left those alone. Also, the Snackbar props do not expose the Modal props, is that by design?
Not entirely sure why the CI is failing but I'm fairly sure it's not because of the definition changes. |
Maybe you can try to rebase on top of v1-beta and push force. |
Some dependents still had the TransitionHandlers props, these have not been modified.
It failed the first time, second time it worked... weird. |
@pvdstel Thanks! |
Resolves #9689.
As of beta 26, it is no longer possible to use transition event handlers (
onEnter
,onExit
, and their variations) in several components using the Modal base component. The implementation has not been removed however, only the TypeScript definitions have been modified to no longer expose these APIs.As discussed in the issue mentioned above (specifically this comment), this change should be reverted. Thus, the TransitionHandler props have been added to ModalProps, and transitively the components extending ModalProps.