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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transition is "appearing" by default and the documentation says that it is false as default #22162
Comments
I just noticed that here in the Material UI the |
This problem seems to be another #11683 or #21924 more recently. We have a prop that is inherited from somewhere else, that we don't document, but yet, we change its default value. Displaying the props with its custom default prop as with the others could be our "best worse" option. Any better UX in mind? (without considerations for the implementation) @eps1lon What solution do you have in mind with? What will be the UX?
|
I'm never going to find it, but I do vaguely recall a discussion back when the transitions were added as to what would be the most sane default. @oliviertassinari is right though - it should be documented. |
The way this default is setup is different to any pattern we're currently using. diff --git a/packages/material-ui/src/Grow/Grow.js b/packages/material-ui/src/Grow/Grow.js
index 6ab04f846d..f3b01095c9 100644
--- a/packages/material-ui/src/Grow/Grow.js
+++ b/packages/material-ui/src/Grow/Grow.js
@@ -28,6 +28,7 @@ const styles = {
*/
const Grow = React.forwardRef(function Grow(props, ref) {
const {
+ appear = true,
children,
in: inProp,
onEnter,
@@ -154,7 +155,7 @@ const Grow = React.forwardRef(function Grow(props, ref) {
return (
<TransitionComponent
- appear
+ appear={appear}
in={inProp}
nodeRef={nodeRef}
onEnter={handleEnter} is the smallest possible change right now (+ Though I don't think we ever had this default documented. |
@eps1lon As far as I know, we never had it documented. Maybe we could have a new prop Hum, maybe not. I'm all 馃挴 for the proposed changes: #22162 (comment). |
I think we can make an argument the documenting |
Hey! Can I take this issue? |
@fakeharahman All yours. Please let us know if you no longer intend to work on this issue. If you're stuck at any point feel free to open a PR so a maintainer can take a look. |
Hey, I got stuck on this so if someone else wants to take this, they are the most welcome to! I will still try to solve this. |
Hi! I can take this if it's okay! 馃槃 |
Current Behavior 馃槸
When using the component
Transition
, the content "appears" instead of having the default behavior of not appearing on the first mount.Expected Behavior 馃
The component should not appear on the first mount, as stated on the documentation.
Steps to Reproduce 馃暪
Steps:
https://codesandbox.io/s/nice-hooks-fpi84?file=/src/Demo.js
Context 馃敠
Your Environment 馃寧
The text was updated successfully, but these errors were encountered: