[Dialog] Looking for a function `onAnimationEnd`
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
I am using Material-ui
Dialog for Modal. It’s work perfectly. I am facing one problem when I am trying to add scrollBarWidth
as padding-right to my fixed header component.
When I close the Dialog then it should be set padding-reigh to 0px. But it done before closing the dialog. That’s why I need a onTransitionEnd/onAnimationEnd Or any transition props
for detecting animation is finished. Anyone can help me.
This is the trigger function
const handleClickOpen = () => {
setOpen(true);
const header = document.querySelector('header');
const scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
header.style.paddingRight = `${scrollBarWidth}px`;
};
const handleClose = () => {
setOpen(false);
const header = document.querySelector('header');
header.style.paddingRight = "0px";
// Here problem is padding-right set 0px before fulfill closing of dialog. That's Why my site is flickering?
};
<Dialog
open={open}
onClose={handleClose}
scroll="paper"
keepMounted
aria-labelledby="scroll-dialog-title"
aria-describedby="scroll-dialog-description"
>
Hello World
</Dialog>
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
[Dialog] Looking for a function onAnimationEnd #30692 - GitHub
I am using Material-ui Dialog for Modal. It's work perfectly. I am facing one problem when I am trying to add scrollBarWidth as...
Read more >Change animation of material-ui dialog show - Stack Overflow
Is it possible to change show animation of dialog in material-ui for react using css? I'm not advanced in css but I know...
Read more >animationend Event - W3Schools
The animationend event occurs when a CSS animation has completed. For more information about CSS Animations, see our tutorial on CSS3 Animations. When...
Read more >Custom Dialog with Circular Reveal Animation | AndroidPub
This is a quick tutorial on how to make a full screen Custom Dialog with Circular Reveal Animation ... public void onAnimationEnd(Animator animation)...
Read more >Animation.setAnimationListener - Java - Tabnine
Create "animation chain" for selected view from list of animation objects * * @param animationList collection with animations * @param animationObject view ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi.
You can pass the following to
Dialog
:Here is a working sandbox: https://codesandbox.io/s/laughing-moore-v3diq?file=/Component/Dialog.js:1243-1347
More APIs are described in here. This doc has been already linked next to
TransitionProps
in our Dialog API docs, so please look more thoroughly before creating a issue.Sorry, I didn’t understand it. Thank you very much