VadimDez / ngx-order-pipe

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

Problem with reverse option but only with a version built with --env=prod #58

Closed calamarico closed 3 years ago

calamarico commented 6 years ago

First, thanks for share your good job with this module, it's very useful.

I'm having a problem with the reverse true option only when the app is built with the --env=prod angular-cli flag. I had other problems with angular-cli with the --aot flag,

I have implemented a material extension panel and I'm using orderBy pipe in this way:

<mat-expansion-panel *ngFor="let purpose of purposes | async | searchPurposes:value | orderBy:'level':true"

In development version it runs ok, no problem. But, as I said, in--env=prod, when I toggle or click in the panel or anything that unleash to angular to compute the pipe, the problem is that the filtered items returned is different at any time that they are returned. If I switch the reverse: true to false, there is no problem (in any version). I can't show at this moment any code because it's a "job work", when I will have time, I will try to do a version for you reproducing this problem. But I thought that maybe you will be interested to know if you have see other problems with the different kind of build versions with angular-cli.

MerkulovDev commented 6 years ago

Also have a problem in build\serve --prod if i'm using array with order params, page is flashing. when i'm scrolling page, every item in table is 'jumping', 'flashing'... looks like some harlem shake on the page ))

*ngFor="let plan of searchService.plans | orderBy: ['top_3', 'plan_price']"

top_3 is boolean plan_price is number

maybe i'm doing something wrong?

calamarico commented 6 years ago

That "jumping" and "flashing" it's the same result as I had, I think you are not doing anything wrong, I think the problem is angular 5 in its "prod version". But I think that maybe there is a solution, only needs to test the pipe behaviour in that state.

MerkulovDev commented 6 years ago

Solved by installing new module. ngx-pipes works fine!

muliyul commented 5 years ago

We're experiencing the same issue when scrolling and there are even values

let items = [{date: '1/1/1990'},{date:'1/1/1990'},{date:'2/1/1990'}]
<tr *ngFor="let s of items | orderBy: 'date'">
stale[bot] commented 3 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.

MilindSuryawanshi commented 3 years ago

I am facing same issue: Using Angular 9, When I clicked on any HTML element on-screen abruptly scrolling/pagination changes. Also, I used mylist.reverse() in my ng-repeat also used pip for some other requirements.