Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS Material Tab height issue

I'm having some troube figuring things out with AngularJS Material, I was wondering if anyone knew why the folling piece of code:

<md-tabs layout-fill >

    <md-tab id="tab1">
        <md-tab-label>Item One</md-tab-label>
        <md-tab-body>

            <md-list>
                <md-subheader class="md-no-sticky">3 line item</md-subheader>
                <md-list-item class="md-3-line" ng-repeat="item in [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,50]">

                    <div class="md-list-item-text">
                        <h3>sdfs</h3>
                        <h4>sdfsd</h4>
                        <p>sdfsdf</p>
                    </div>
                </md-list-item>

            </md-list>
        </md-tab-body>
    </md-tab>

</md-tabs>

produces this on firefox.

and this on chrome.

sorry about not posting images directly I don't have enough reputation.

like image 889
Ejiro Pinnock Avatar asked May 18 '15 23:05

Ejiro Pinnock


People also ask

How do I change the height of my mat tab?

By default, the tab group will not change its height to the height of the currently active tab. To change this, set the dynamicHeight input to true. The tab body will animate its height according to the height of the active tab.

What is md tab?

Stemetil MD Tablet blocks the action of chemicals in the body that can make you feel or be sick. It is often used to prevent nausea and vomiting that may be caused due to some medicines and it is also effective in treating nausea/vomiting after an operation (in adults only).


1 Answers

I also Had a similar issue. Though md-dynamic-height solved it...

You can try using:

<md-tabs md-dynamic-height>
  <md-tab>
    <md-tab-label>Tab label</md-tab-label>
    <md-tab-body>
      <md-content>The tab content</md-content>
    </md-tab-body>
  </md-tab>
</md-tabs>
like image 62
Christopher Mahl Avatar answered Sep 19 '22 22:09

Christopher Mahl