VadimDez / ngx-order-pipe

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

Allow to sort also by function return value? #74

Closed davidmpaz closed 5 years ago

davidmpaz commented 6 years ago

Hi,

first of all, thanksa lot for this project. I was wondering if it would be possible to add possibility to use a function as field value to use.

Currently we can do: orderBy: 'name' or orderBy: 'account.name'

My request is to allow this scenario: orderBy: 'product.getPrice' where price is a function inside product.

thanks in advance, best regards, David

yanis-git commented 5 years ago

Hello @davidmpaz ,

is this implementation looks good for your ? https://github.com/VadimDez/ngx-order-pipe/pull/79

Kind Regards,

davidmpaz commented 5 years ago

Hi @yanis-git ... thanks for taking time for this one!!

Yeap! indeed looks great.

Whenever this get into main stream we can close this issue.

Kind Regards

VadimDez commented 5 years ago

Released in 2.0.2