[table] add example how to write generic code for md-table
Bug, feature request, or proposal:
how to write generic data table for dynamic columns with sorting,filtering and pagination.
What is the expected behavior?
seeing implementation instructions and/or an example of how to write generic code if their are multiple tables on page.
What is the current behavior?
I have to repeat the classes for database and data source for each table as switch case hard coded column names in it.
What is the use-case or motivation for changing an existing behavior?
i have to write multiple classes for multiple tables in my component.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
angular 4 material 2 typescript 2.4 windows
Is there anything else we should know?
You have a couple options,
- Write your data source to be more generic
- Wait until the next release and use
MatTableDataSource(docs being updated in https://github.com/angular/material2/pull/8162)
Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc.
Thanks @willshowell
and i will keep in mind next time @jelbourn
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.