Set vertical scroll to a fixed height mat-table in Angular

10,482

Not sure if you are still looking for an answer, but just in case.

You might be missing overflow: auto; in you div styles.

Share:
10,482

Related videos on Youtube

androniennn
Author by

androniennn

Updated on June 04, 2022

Comments

  • androniennn
    androniennn almost 2 years

    I have set a height of 200px to the container of my mat-table. However, the table and its content does not respect the setted height. I want to add a vertical scroll to this table. enter image description here

    <div style="height: 200px;">
        <mat-table>table content</mat-table>
    </div>
    
  • androniennn
    androniennn over 5 years
    I already found the answer. But I really thank you for taking your time to answer me.