Skip to content

Commit

Permalink
issue primefaces#4071 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Louis committed Sep 18, 2023
1 parent b4662a7 commit c99ef1f
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions components/lib/api/FilterService.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@ const FilterService = {
filter(value, fields, filterValue, filterMatchMode, filterLocale) {
let filteredItems = [];

if (value) {
for (let item of value) {
for (let field of fields) {
let fieldValue = ObjectUtils.resolveFieldData(item, field);
if (!value) {
return filteredItems;
}

for (const item of value) {
if (typeof item === 'string') {
if (this.filters[filterMatchMode](item, filterValue, filterLocale)) {
filteredItems.push(item);
continue;
}
} else {
for (const field of fields) {
const fieldValue = ObjectUtils.resolveFieldData(item, field);

if (this.filters[filterMatchMode](fieldValue, filterValue, filterLocale)) {
filteredItems.push(item);
Expand Down

0 comments on commit c99ef1f

Please sign in to comment.