如何获取primeng数据表中某列的过滤值?

How to get the filtered value of a column in primeng datatable?

我有一个包含 10 列的数据表。在更改列中的过滤器值时,我必须显示带有过滤值的警报消息。

 <p-dataTable #dt [value]="jobslist" [rows]="30" [paginator]="true" [rowsPerPageOptions]="[30,50,75]" sortMode="multiple" scrollable="true"   resizableColumns="true" scrollHeight="350px">
  <p-column [style]="{'width':'70px'}" field="org" header ="Org" [sortable]="true" [filter]="true"></p-column>
</p-datatable>

如果用户在过滤器中输入 Org 2,它应该显示 "You have selected Org 2"。谁能告诉我该怎么做?

//还不能发表评论所以我要POST

你试过PrimeNG DataTable的(onFilter)函数了吗?该函数接受过滤事件,还有 event.filtered(如 Prime 文档所述),因此您可能想尝试这种方法。