DataTable/TreeTable: GlobalFilter not working with filterable="false"
See original GitHub issueDescribe the defect
Global filter works only on p:column that has atribute filtarable="true"
, but it should work on every column that has filterBy=""
atribute.
I have a datatable where I need only the global filter, not the column filters. To disable column filter I use <p:column filterable="false"/>
, but this breaks the GlobalFilter in PF10, in PF8 it works as expected.
I haven’t tested yet, but this may affect treetable too.
Reproducer Clone repository https://github.com/stefan-dan/primefaces-test
Environment:
- PF Version: 10.0
- JSF + version: Mojarra 2.2.8 and MyFaces 2.3.6
- Affected browsers: ALL
To Reproduce Steps to reproduce the behavior:
- Go to ‘http://localhost:8080/primefaces-test/’
- Click on 'Global filter Enter keyword’
- Write ‘Stefan’
- Works as expected
- Write ‘Moldova’
- See error
Expected behavior Expected behaviour: Global filter should work on all p:columns that has atribute filterBy=“”, despite of filterable=“” value.
Example XHTML
<p:dataTable var="customer" value="#{dtFilterView.customers1}" widgetVar="customersTable"
emptyMessage="No customers found with given criteria"
filteredValue="#{dtFilterView.filteredCustomers1}">
<f:facet name="header">
<div class="p-d-flex p-ai-center p-jc-between">
<span>List of Customers</span>
<p:inputText id="globalFilter" onkeyup="PF('customersTable').filter()" style="width:10rem" placeholder="Enter keyword" />
</div>
</f:facet>
<p:column headerText="Name" sortBy="#{customer.name}" filterBy="#{customer.name}" filterable="false">
<h:outputText value="#{customer.name}" />
</p:column>
</p:dataTable>
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Spring Cloud Gateway Global Filter Not Working
I'm not getting an output from my global filter (or any of my filters). I can verify that the bean for each filter...
Read more >Why Global Search Is Not Working For This Primeng Table
My global filter works perfectly when it is placed in the p:dataTable but I want to put it outside of data table and...
Read more >Global Filter - Innovative Filtration Solutions
Global Filter, offers you filtration products and solutions to help make the world safer, healthier, & more productive.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
because of this example: https://www.primefaces.org/showcase/ui/data/datatable/field.xhtml Fields sets a whole bunch of defaults and you can turn things off with
filterable="false"
etc.How about instead of
hideFilter
we usefilterDisplayed
with a default totrue
and you can hide it withfilterDisplayed="false"
that way it starts with the word “filter” so IDE’s and our doc pages have it lined up with other filter props?