materialize
materialize copied to clipboard
updateTabIndicator should have option to bypass animation
Expected Behavior
The tab indicator should only be stretched to the length of the active tab even if the tabs are located in a modal
Current Behavior
If the tabs are located in a modal, the tab indicator stretches on full length of the 'div' holding the tab/tabs on the first open of the modal
Possible Solution
As someone suggested on Gitter (thank you @matrixbot) this might be caused by the fact that the modal has no length before initialization; so this lead might worth checking out
As a workaround the user could initialize the tabs in the 'onOpenEnd' of the modal (thanks @matrixbot again for finding this) -> this results in a 'sliding' animation of the indicator as it gets in position
Steps to Reproduce (for bugs)
- Open https://codepen.io/rbogdy/pen/ERGrey
- Click on the Modal button and see the way the indicator is stretched on the 1st opening
Context
I wanted to use the tabs in a modal
Your Environment
- Version used: 1.0.0-rc.2
- Browser Name and version: Firefox 61.0 (64-bit); Google Chrome 67.0.3396.99 (Official Build) (64-bit)
- Operating System and version (desktop or mobile): Windows 7
- Link to your project (if appropriate):