原子全局过滤器没有列过滤器 [英] primefaces global filter without the column filters
问题描述
我正在处理原文中提到的示例展示。我试图为datatable创建一个全局过滤器。
目前的表格如下所示:
I'm working on the example mentioned in primefaces showcase. I am trying to create a global filter for the datatable.
Currently the table looks like this:
我想要做的是删除单个列过滤器,并且只有全局过滤器。
像这样:
To这样做我删除列定义的 filterBy
属性。但是在这样做的时候,我收到一个javascript警告 - 解析
filter ,声明放弃
和全局过滤器的错误不行
可能有人请告诉我如何实现这一点?
What I want to do is remove the individual column filters and have only the global filter.
Like this:
To do that I remove the filterBy
attribute on the column definitions. But on doing that, I get a javascript warning - Error in parsing value for
filter, declaration dropped
and the global filter doesn't work.
Could someone please tell me how to achieve this?
推荐答案
确保你有code> filterBy =#{myRowVar.sonmeField}在每个 p:column
(因为全局过滤器需要它)
Make sure you have the filterBy="#{myRowVar.sonmeField}"
in every p:column
(because the global filter needs it)
还可以在每个 p:column $中添加
filterStyle =display:none
c $ c>(添加 filterStyle =display:none
将使其不可见...)
And also add the filterStyle="display:none"
in every p:column
(adding of filterStyle="display:none"
will make it not visible...)
这篇关于原子全局过滤器没有列过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!