VadimDez / ngx-order-pipe

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

Create Ivy build #154

Closed btxtiger closed 1 month ago

btxtiger commented 1 year ago
- ngx-order-pipe [es2015/esm2015] (git+https://github.com/VadimDez/ngx-order-pipe.git)
Encourage the library authors to publish an Ivy distribution.
stale[bot] commented 1 year 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.

nerumo commented 1 year ago

@VadimDez can you have a look at the PR?

btxtiger commented 1 year ago

image

Now its breaking with Angular 16. If it's not yet, just delete your node_modules folder followed by reinstalling npm and try to compile again. I'm dropping this library

stormbreakR1 commented 1 year ago

Anyone who have faced this same issue and found any replacement, plz do share as authors of this plugin is not publishing any update for ivy.

btxtiger commented 1 year ago

@stormbreakR1 is super simple to create a custom pipe and use lodash orderBy or lodash sortBy for sorting. This way you could also keep the type if you implement it as generic

stormbreakR1 commented 1 year ago

@btxtiger thanks

stale[bot] commented 9 months 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.

reda-alaoui commented 9 months ago

🙏

hardcorelite commented 9 months ago

npm i ngx-pipes

stale[bot] commented 6 months 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.

nerumo commented 6 months ago

still a problem

btxtiger commented 5 months ago

@nerumo npm i -S lodash-es

import { Pipe, PipeTransform } from '@angular/core';
import { orderBy as _orderBy } from 'lodash-es';

@Pipe({
   name: 'orderBy',
   standalone: true,
})
export class NgxOrderPipe<T> implements PipeTransform {
   transform(data: T[], orderBy: string, direction: 'asc' | 'desc' = 'asc'): T[] {
      return _orderBy(data, orderBy, direction);
   }
}
nerumo commented 5 months ago

@nerumo npm i -S lodash-es

import { Pipe, PipeTransform } from '@angular/core';
import { orderBy as _orderBy } from 'lodash-es';

@Pipe({
   name: 'orderBy',
   standalone: true,
})
export class NgxOrderPipe<T> implements PipeTransform {
   transform(data: T[], orderBy: string, direction: 'asc' | 'desc' = 'asc'): T[] {
      return _orderBy(data, orderBy, direction);
   }
}

If this is the course of action you suggest, then this repository should be archived

btxtiger commented 5 months ago

@nerumo This is a quickfix for most usecases. I would rather takeover this repo, since the original author is not answering anymore. However if I get some time soon, I'll otherwise create a new library for this.

VadimDez commented 1 month ago

Fixed by version 3.0.0