question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Tabs] Highlight underline wider that tab

See original GitHub issue

staticshot_30-01-2018_10-15-12

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Exact highlight underline alignment all the time (even after heat death of the universe).

Current Behavior

(In my app) after page reload the line goes under the second tab. It fixes itself on second render or on window resize.

Steps to Reproduce (for bugs)

I don’t have a small project to reproduce this. I made only this video https://streamable.com/swsom If you have no idea why it happens just close this issue (I will try to fix it later).

<Tabs
    indicatorColor="primary"
    textColor="primary"
    value={this.props.activeTab}
    onChange={this.onTabsChange}
    fullWidth
>
    <Tab label="Sign In" value="login" />
    <Tab label="Sign Up" value="register" />
</Tabs>

Your Environment

Tech Version
Material-UI 1.0.0-beta.31
React 16.2.0
browser Chromium 63.0.3239.132

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
01e9commented, Jan 30, 2018

This fixes the problem

action={(actions) => setTimeout(actions.updateIndicator.bind(actions), 0)}

This doesn’t

action={(actions) => actions.updateIndicator()}
2reactions
oliviertassinaricommented, Jan 30, 2018

How to trigger the recalculation/refresh of the components from code?

@arteniioleg Use the action property + updateIndicator(): https://material-ui-next.com/api/tabs/#tabs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Tabs] Highlight underline wider that tab · Issue #10094 - GitHub
Current Behavior. (In my app) after page reload the line goes under the second tab. It fixes itself on second render or on...
Read more >
Highlight active tabs - Stack Overflow
Wanted to check if we can highlight the active tabs . i mean when the user is in one tab ("agh"), that tab...
Read more >
Create tab buttons with sliding underline effect in Webflow
https://codepen.io/everdimension/pen/xZLggoChapters:00:00 Intro and morning announcements29:45 Tutorial44:00 Q&A + ReviewsJoin the Pixel ...
Read more >
W3.CSS Tabs - W3Schools
Tabbed navigation is a way to navigate around a website. Normally, tabbed navigation uses navigation buttons (tabs) arranged together with the selected tab...
Read more >
tab-size - CSS: Cascading Style Sheets - MDN Web Docs
The tab-size CSS property is used to customize the width of tab characters ... pre { tab-size: 4; /* Set tab size to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found