-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Issue summary
Modal is not properly animated when rendered with open set to true directly.
open && <Modal open ... />
<Modal open={open}
For performance optimizations, we often defer the loading of the Modal and its content using createAsyncComponent from react-async. When following this recipe, you will loose the animation on Modal.
Expected behavior
Modal should always be animated when opened, wether the component is directly mounted with open set to true or open is toggled from false to true.
Actual behavior
The Modal is not properly animated (missing vertical translation).
Steps to reproduce the problem
See code sandbox link below.
Reduced test case
https://codesandbox.io/s/ancient-violet-z8te6
Specifications
- Are you using the React components? (Y/N): Y
- Polaris version number: "@shopify/polaris": "3.20.0",
- Browser: Chrome
- Device: Mac
- Operating System:
10.14.5
Or run npx envinfo --system --binaries --browsers --npmPackages react,react-dom,@shopify/polaris to provide specifications on your environment including version numbers, browser, device, and operating system.
Paste the results here:

