Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

bug(top-app-bar): foundation should be destroyed and reinitialized on variant change #517

Closed
mgr34 opened this issue Dec 13, 2018 · 1 comment
Milestone

Comments

@mgr34
Copy link
Contributor

mgr34 commented Dec 13, 2018

When the <TopAppBar/>'s variant changes the foundation is not reinitialized. For example, if mounted with fixed=true and an update changes this to fixed=false the component should destroy() the present foundation (an instanceof MDCFixedTopAppBarFoundation) and reinitialize a plain MDCTopAppBarFoundation. Otherwise upon scroll mdc-top-app-bar--fixed-scrolled className will be added to the <TopAppBar/>.

Note: I believe I have a PR nearly complete. New to Screenshot testing. Had some issues figuring out setting up the environment (see: discord ).

@moog16
Copy link

moog16 commented Dec 13, 2018

@mgr34 Ya we do need something to switch if that is your intention. This is similar to the Drawer. Please see this 36e6316.

I think the same principles can be applied to top app bar.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants