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.

proposal(tab): component inside md-tab but outside mat-tab-body-content

See original GitHub issue

Bug, feature request, or proposal:

proposal?

What is the expected behavior?

Create an area to put some content inside the md-tab but outside the mat-tab-body-content

What is the current behavior?

Everything you put inside a md-tab will be inside the mat-tab-body-content and cannot have a fixed position

What is the use-case or motivation for changing an existing behavior?

I have a scenario with a page that uses tabs to show many “subpages”. In this scenario, I need to show a content that is contextual to the selected tab but needs to have a fixed position on the page. If I set position: fixed to this element, as the mat-tab-body-content has a transform: translate3d(0px, 0px, 0px), the component looses it’s “fixed” behaviour.

If you look at this Plunker and scroll down the page, you’ll see that the “fixed” content inside the tab is scrolled within it.

Which versions of Angular, Material, OS, browsers are affected?

2.0.0-beta-3

Is there anything else we should know?

For now, the way I found to solve this is to create the component outside the tab, and render it based on the selectedIndex of the md-tab-group, but I think this solution is really poor as my parent component needs to know the behaviour of my internal component and if someone change my tabs (let’s say create a new tab on the beginning) all of my tab indexes will change.

I don’t know if the explanation above was really clear but if you have some doubt just ask me.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
vilkoalexandercommented, Dec 11, 2018

@andrewseguin & @amcdnl

Can you provide a link to nav-tab please ? I can’t find it…

https://material.angular.io/components/tabs/examples the lowest example

0reactions
angular-automatic-lock-bot[bot]commented, Sep 10, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular mat-tab : content of only initial selected tab is loaded
I would load the information on selectedTabChange() then load the information into the diagram. cause, indeed angular mat-tab are eagerly ...
Read more >
Tabs - Angular Material
Angular Material tabs organize content into separate views where only one view can be visible at a time. Each tab's label is shown...
Read more >
Tab component | Commerce Frontend Development
The Tab component implements a tab content area. See the Admin Design Pattern Library (Tabs) topic for information about the UI design ...
Read more >
Tab labels on a Lightning Record Page are extending beyond ...
7. Click on the Contact tab and see the Tab labels extending outside the Tabs component. Workaround 1. Refresh the browser tab 2....
Read more >
Tabs | Components - BootstrapVue
When <b-tabs> is in card mode, each <b-tab> sub-component will automatically have the card-body class applied (this class provides the padding around the...
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