Skip to content

Commit

Permalink
remove linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
RheuX committed Nov 7, 2024
1 parent 94826da commit 7f6d95b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/shared/table-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const filterSpecificFields = (filterFields: string[]): any => {
const normalizedFilter = filter.trim().toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '');
for (let i = 0; i < filterFields.length; i++) {
const fieldValue = getProperty(data, filterFields[i]);
if (typeof fieldValue === 'string' &&
if (typeof fieldValue === 'string' &&
fieldValue.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '').indexOf(normalizedFilter) > -1) {
return true;
}
Expand All @@ -47,7 +47,8 @@ export const filterSpecificFields = (filterFields: string[]): any => {

export const filterSpecificFieldsByWord = (filterFields: string[]): any => {
return (data: any, filter: string) => {
const words = filter.split(' ').map(value => value.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '')); // Normalize each word
const words = filter.split(' ').map(value => value.toLowerCase().normalize('NFD')
.replace(/[\u0300-\u036f]/g, '')); // Normalize each word
return words.every(word => {
return filterFields.some(field => {
const fieldValue = getProperty(data, field);
Expand Down

0 comments on commit 7f6d95b

Please sign in to comment.