p表tablePerPageOptions不会扩展下拉列表 [英] p-table rowsPerPageOptions does not expand the dropdown
本文介绍了p表tablePerPageOptions不会扩展下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用p-table组件尝试显示带有每页行数的下拉菜单的分页器(rowsPerPageOptions):
I'm using the p-table component trying to show the paginator with the dropdown with rows per page option (rowsPerPageOptions):
<p-table
[columns]="cols"
[value]="myData"
[paginator]="true"
[rows]="2"
[rowsPerPageOptions]="[1,2,3]">
该表在使用分页器控件时显示得很好,但是包含每页选项的下拉列表不会扩展(删除).
The table shows up fine with the paginator control, but the dropdown that contains the per-page option does not expand (drop).
Here's the stackblitz link of the app - https://stackblitz.com/edit/angular-xywt2w?file=app/provider-search/provider-search.component.html
为什么下拉列表不起作用?
Why does the dropdown not work?
推荐答案
确保在app.module.ts
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
imports: [ BrowserModule,BrowserAnimationsModule ... ]
// ...
})
这篇关于p表tablePerPageOptions不会扩展下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文