dataTable filter should work normally
When I am trying to use the filter inside the dataTable is not filtering the data
Upgrade primefaces 5.3 to 6.0
<f:facet name="header">
<div align="left">
<p:outputPanel>
<p:inputText id="globalFilter" onkeyup="PF('DataTable').filter();PF('statusDialog').hide()" style="width:150px;" placeholder="#{msg['SearchFields']}" />
</p:outputPanel>
</div>
</f:facet>
<p:column headerText="#{msg['Description']}" sortBy="#{holiday.name}" filterBy="#{holiday.name}" filterStyle="display:none" filterMatchMode="contains" class="fixed_table_width">
<h:outputText value="#{holiday.name}" />
</p:column>
public class Holiday extends TimestampEntity implements Serializable {
private static final long serialVersionUID = 1L;
private int id;
private String name;
private Date startDate;
private Date endDate;
private Company company;
public Holiday() {
}
public Holiday(int id, String name, Date startDate, Date endDate, Company company) {
super();
this.id = id;
this.name = name;
this.startDate = startDate;
this.endDate = endDate;
this.company = company;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public Company getCompany() {
return company;
}
public void setCompany(Company company) {
this.company = company;
}
}
I suggest you take the steps above and "Clone this repository https://github.com/primefaces/primefaces-test.git in order to reproduce your problem, you'll have better chance to receive an answer and a solution."
We use datatable filtering all the time and it is working fine in PF 6.0 so it must be something wrong with your code. By creating a simple test case like above you should be able to prove whether or not it is a real bug.
The sample is not complete and not in minimal form. There is no HolidayBean and no TimestampEntity for instance.
AFAICS, please check the way to create the table and examine any error on the console since using ajax='false' is suspicious.
<p:commandButton action="#{holidayBean.create()}" ... ajax="false" type="push" />
closing as invalid as the sample is not complete. Maybe better try to forum first if you don't have a complete sample.
Most helpful comment
I suggest you take the steps above and "Clone this repository https://github.com/primefaces/primefaces-test.git in order to reproduce your problem, you'll have better chance to receive an answer and a solution."
We use datatable filtering all the time and it is working fine in PF 6.0 so it must be something wrong with your code. By creating a simple test case like above you should be able to prove whether or not it is a real bug.