Commit 670180e4 by Nattana Chaiyamat

ทะเบียนพนักงาน

parent 75c45679
......@@ -221,8 +221,10 @@ export class DatagridSyncfutionComponent implements OnInit {
}
filterData(text: string, fields: string[]): any[] {
return this.dataSource.filter(item => {
return fields.some(field =>
item[field]?.toString().toLowerCase().includes(text.toLowerCase())
return fields.some(field => {
const value = field.split('.').reduce((obj, key) => obj?.[key], item);
return value?.toString().toLowerCase().includes(text.toLowerCase());
}
);
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment