Skip to content

Commit

Permalink
issue #4071 fix (#4447)
Browse files Browse the repository at this point in the history
Co-authored-by: jan.g <[email protected]>
  • Loading branch information
CraZzier and jan.g authored Oct 8, 2023
1 parent b9caf7d commit 4b933f7
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) {

Check failure on line 6 in components/lib/api/FilterService.js

View workflow job for this annotation

GitHub Actions / build (16.x)

Expected blank line before this statement

Check failure on line 6 in components/lib/api/FilterService.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected blank line before this statement
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 4b933f7

Please sign in to comment.