I need to change the size of my Angular material table (number of rows) in a dynamic way.
So for example, if my code looks like this:
My table ...
I want that by click on 1 it will show only one row, by click on 2 - two, etc.
I was thinking to splice the
dataSource array every time in
updateRows() but I'm not sure it's the best option.
Is there a better way to do it, using
The thing is that I don't want to show the pagination, nor the small drop down with the number of rows to show. I need to customize it like in the html above, and only by click the labels in top upper div to change the number of display rows in the table.
Also, I don't want to use pagination, only to change the number of rows.