Cleared of the stuff the EnCoach team wanted changed

This commit is contained in:
Tiago Ribeiro
2024-10-28 14:40:26 +00:00
parent 0becd295b0
commit fa0c502467
34 changed files with 166 additions and 107 deletions

View File

@@ -20,7 +20,7 @@ const getFieldValue = (fields: string[], data: any): string | string[] => {
return data;
};
export const search = (text: string, fields: string[][], rows: any[]) => {
export const search = <T>(text: string, fields: string[][], rows: T[]) => {
const searchText = text.toLowerCase();
return rows.filter((row) => {
return fields.some((fieldsKeys) => {