-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Tabs] Update position when layout change (ResizeObserver) #9337
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I ended up just triggering a window resize event window.dispatchEvent(new CustomEvent('resize')) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
We observe this same issue when using |
I observe the same issue when we have the tabs in a popover, but the fix below does not work for us
|
We find the same issue with the Modal and the ref/resize fix does not work for us either |
See my fix here #19786 (comment) |
This worked well for me 👍 thanks for the help.
|
Expected Behavior
Tab indicator should dynamically resize its width when the parent container width changes
Current Behavior
Tab indicator doesn't resize when the parent container width changes ~ only when the viewport size does
When parent container size changes:
![image](https://user-images.githubusercontent.com/13242392/33398796-13bf5954-d548-11e7-8131-9a374e2da060.png)
![image](https://user-images.githubusercontent.com/13242392/33398801-186efd88-d548-11e7-9174-b2d7f937bee5.png)
What it should look like / what it looks like after triggering a re-render:
Steps to Reproduce (for bugs)
Context
I'm using the tabs in a appbar using the persistent drawer layout, opening / closing the menu breaks the tab indicators until a manual re-render
Your Environment
The text was updated successfully, but these errors were encountered: