VadimDez / ngx-order-pipe

▼ Angular 5+ orderBy pipe
https://vadimdez.github.io/ngx-order-pipe/
MIT License
243 stars 57 forks source link

Get sorted array from pipe to component. #123

Closed dugls closed 2 years ago

dugls commented 3 years ago

First of all thanks for such great pipe, it is working very well in my project. But I have an issue, every time when I have table which user can print or export to csv I have to create pipe inside my .ts file like new OrderPipe().transform(arr, header, order) to get actual sorted array for print or export. In my opinion it's not very good approach, can you modify the library to return actual list from pipe. Like *ngFor="let item of data | orderBy : header : order : getSortedArray", where getSortedArray will be a callback in .ts file to get actual sorted array. What do you think about this? If I get a chance I can take a look at the library code and create pull request with changes I described.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.