5 Replies
https://stackblitz.com/edit/sb1-pf2wz2nv here's the Stackblitz of a simplified example
I suspect that you will need to provide more details.
Ideally in a "working" demo such as on Codepen or similar.
That said, I do have a couple of questions/clarifications
Presumably you are using scss.
You are defining your .fixed-height as having a max height of calc(100% - 120px);
Has the parent element got a defined height? To be able to calculate a value based on a percentage you need to have a defined parent value (in this case height).
I presume that it is an Angular thing as "mat-table" is clearly not a valid HTML element. For it to work as is you would at very least need to define the element to be a block element as, I believe, browsers display non standard elements as inline.
That is giving me a 404
I think it was private, now I set it to public
In my real case, it's inside a <mat-dialog> which is tall 90vh, inside it there's a mat-card set to height: 100%; and inside the card-content there's this table with some controls above it.
I'm trying to make the example similar to my real use case
I can't see to get stackblitz to update the preview with any of my changes, even no related ones. This is most likely due to my complete lack of knowledge of Angular.
Have you tried adding
display: block
to the mat-table element? This does do the trick when I add it via dev tools.Yeh I'm editing the css on devtools as well but it seems to work fine on the stackblitz, the mat-table is a material component and it comes with d-block property