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.

Hello 😃

I want my Tab’s element (Tab, the Tabs children) to be at height: 100%; overflow-y: auto; when they are active but I cant make it work with the style={{height: "100%"; overflowY: "auto";}} on the Tab element.

Can you help me with this ? Thanks

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

5reactions
pnpetrovcommented, Sep 12, 2016

@binarykitchen you can try something like that

class TabTemplate extends React.Component {
    render() {
        if (!this.props.selected) {
            return null;
        }

        return this.props.children;
    }
}

class TestComponent extends React.Component {
    get styles() {
        return {
            root: {
                flex: '1 1 100%',
                minHeight: 0,
                display: 'flex',
                flexDirection: 'column'
            },
            container: {
                flex: '1 1 100%;',
                display: 'flex',
                flexDirection: 'column',
                overflowY: 'auto'
            }
        };
    }

    render() {
        return (
            <Tabs
                style={this.styles.root}
                contentContainerStyle={this.styles.container}
                tabTemplate={TabTemplate}
            >
                <Tab label="tab1"></Tab>
                <Tab label="tab2"></Tab>
            </Tabs>
        );
    }
}
4reactions
pnpetrovcommented, Jun 9, 2016

Same here, wondering how I can adjust tab/tabs height …

You can override the TabTemplate

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get 100% height and width of tab panel using ...
I am using bootstrap 4.3. bootstrap 4.3 has sizing classes m-* and w-* to set the height and width of the element. I...
Read more >
CSS Trick: Tabs with consistent height - Observable
Sometimes you will have tabs with content of similar but not equal height, such as in this example from the ... Solution: Flexbox...
Read more >
[Tabs] Md-tab height: 100% does not give all height of group ...
Hi, I'm having problems to adjust content of a tab to 100% of height of md-tab-group For example: // this works all bk...
Read more >
Use 100% of height for tabs | jQuery Forums - Syncfusion
Based on your requirement, we have got the document height and set the height to the container element in the initial load. Now...
Read more >
newbie help: tab content height 100%
I am trying to put my current content into a tabs panel. I have a single div with a map in it. It...
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