I have a simple mat-table
with mat-paginator
.
By default design it looks like this:
I would like to change the placing of the range label and put it between the navigation buttons, like this:
Basically, I need to move the div.mat-paginator-range-label
an element from the top of this container between button.mat-paginator-navigation-previous
and button.mat-paginator-navigation-next
.
Any idea of how to do it? Thanks.
Taras, thank you for answer! This is what i really need! I have implemented by your recommendation, and have got result like this:
Implemented with custom after range label
Actually because the "mat-paginator-container" uses flexbox you can easily modify the default placing of all the components just with a custom CSS code. For instance for me:
Ok, I create a solution for how to do it. I use a
Renderer2
to do the manipulation withDOM
, and it looks like this:In my case
this._renderer
is an instance ofRenderer2
, and also theHTML
code withViewChild
decorator.If someone knows the better solution how to do it, please let me know. Otherwise, I hope my answer will help you with a similar task. Thanks