-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
TabPane with unmountOnExit should retain transition #3497
Comments
It should retain the transition, active isn't toggled to false until the transition calls it's onExited callback, at which point we render null so it's unmounted |
I can't confirm that the transition is happening and unless I'm missing anything I don't see how it should happen given the source code. The following snippet shows how the active:
props.active == null && key != null
? makeEventKey(activeKey) === key
: props.active, The |
Sorry are you saying it is working but you don't understand why or it's not working? |
It's not working for me and the source code doesn't look like it's doing the right thing either. |
Ok probably a bug then |
I've put together a small example based on the custom tabs layout example from the docs: https://codesandbox.io/s/xl5n993np4 Change the |
yup you're right, I think that one line should be |
Bump! Hi project maintainers. Can we get the proposed fix above in? I can make a PR if you'd like. I actually started, but thought I'd bump this issue first before putting in too much time to accumulate PR detail. Happy to do whatever is most helpful! Thanks. |
We'd be happy to take a PR here. |
The docs incorrectly suggest that the transition prop accepts the value 'true' to use the 'Fade' transition. Rather, the 'Fade' transition is applied by default. Otherwise, the transition prop accepts 'false' or a react-transition-group 'Transition' component. Refs react-bootstrap#3497
Also, fix documentation errors: - Tab component docs stated that the transition prop of value 'true' would use the 'Fade' transition. Rather, the 'Fade' transition is applied by default. Otherwise, the transition prop accepts 'false' or a react-transition-group 'Transition' component. - Replace references to v2 with v4 Refs react-bootstrap#3497
Also, fix documentation errors: - Tab component docs stated that the transition prop of value 'true' would use the 'Fade' transition. Rather, the 'Fade' transition is applied by default. Otherwise, the transition prop accepts 'false' or a react-transition-group 'Transition' component. - Replace references to v2 with v4 Refs react-bootstrap#3497
Also, fix documentation errors: - Tab component docs stated that the transition prop of value 'true' would use the 'Fade' transition. Rather, the 'Fade' transition is applied by default. Otherwise, the transition prop accepts 'false' or a react-transition-group 'Transition' component. - Replace references to v2 with v4 Refs #3497
fixed in #4312 |
I would have expected
TabPane
to retain the transition even whenunmountOnExit
istrue
, but looking at the the sourcenull
is returned immediately rather than whenonExited
is triggered. Is this intended?The text was updated successfully, but these errors were encountered: