Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableDataSource should extend MatTableDataSource instead of DataSource #15

Open
MarcoLasticot opened this issue Jun 25, 2018 · 6 comments

Comments

@MarcoLasticot
Copy link

Hi irossimoline,

First of all, what you've developed is very cool and useful.
I think it could even be better with few changes.
TableDataSource should extend MatTableDataSource instead of DataSource. Like that, TableDataSource would inherited the filter and sort methods which are provided OOTB by Material.

@irossimoline
Copy link
Owner

Hi @MarcoLasticot,

I think it could be done with a kind of big refactoring, but to keep being backwards compatible we must consider:

  • Do not enforce to depend on @angular/material package. It could be present, or it couldn't, and should be OK.
  • Keep extending DataSource, and have another structure that extends MatTableDataSource (again, backwards compatibility).
  • On the code used, try to share the most amount of code posible between both structures.
  • Recheck CRUD implementation to validate that filter and sort methods don't interfere with current implementation. Regarding this specific point, I think it would create some issues, because we are currently handling everything with the index in the array, but that value won't be a source of truth anymore using filter/sorting. We should provide a way to specify which is/are the key(s) in the list object's type provided to the list, and then modify the code to use that key.

This would require a quite big amount of work, I'm not sure I could tackle it soon. Anyway, if someone want to help with it, it would be appreciated.

@rosostolato
Copy link

Hey guys! Was there any advance with this issue?

@golshidb93
Copy link

Hi guys,
I'm using your library and it has been very useful so far. The only thing missing is that I can't use sort and filter functionalities, and I really need it. Thanks for all the hard work so far :-)

@boazhuisman
Copy link
Collaborator

boazhuisman commented May 7, 2019

He @irossimoline , I'd be willing to help taking into account backwards compatibility. But I'd like to do it together since you're the author. Maybe we can set up a feature branch or something?

@irossimoline
Copy link
Owner

Hi @boazhuisman, sure I would love a solution that takes backwards compatibility into account.

I've created a branch named feature/allow-extend-material-table and added you as a collaborator, so you can start from there.

I don't have much available time right now, but please mention me anywhere you need extra help and I'll be willing to help you.

@rohini007
Copy link

Any update on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants