Skip to content

Commit

Permalink
issue primefaces#4071 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.g committed Sep 14, 2023
1 parent 86e0cbd commit eb967d4
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 @@ -3,11 +3,20 @@ import { ObjectUtils } from 'primevue/utils';
const FilterService = {
filter(value, fields, filterValue, filterMatchMode, filterLocale) {
let filteredItems = [];
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 (value) {
for (let item of value) {
for (let field of fields) {
let fieldValue = ObjectUtils.resolveFieldData(item, field);

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

0 comments on commit eb967d4

Please sign in to comment.