[英]Is there any way to move paginator from ngx-datatable to header instead of footer?
I set up my ngx-datatable with the paginator inside an angular project as below.我在 angular 项目中使用分页器设置了我的 ngx-datatable,如下所示。
<ngx-datatable class="material" [rows]="rows"...
[count]="count" [limit]="5" [offset]="0" (page)="setPage($event)">
It works and the pagination is shown.它有效并显示分页。 But I want to show it in header too, is there anyway I can capy the one from footer and put it in header?
但我也想在 header 中显示它,无论如何我可以从页脚中复制一个并把它放在 header 中吗?
Looks like it does not have built-in
option, but based on this GitHub conversation , you can do it with custom CSS:看起来它没有
built-in
选项,但基于这个GitHub 对话,您可以使用自定义 CSS 来完成:
.ngx-datatable .datatable-footer {
position: absolute;
top: 0;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.ngx-datatable .datatable-header {
position: absolute;
top: 50px;
}
.ngx-datatable .datatable-body {
margin-top: 100px;
}
I just tested it and it still works.我刚刚测试了它,它仍然有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.