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

Disable Sorting on a click #40

Closed
giripradip opened this issue Dec 21, 2017 · 7 comments
Closed

Disable Sorting on a click #40

giripradip opened this issue Dec 21, 2017 · 7 comments
Labels

Comments

@giripradip
Copy link

I am using angular5 and I am sorting an array of objects using ngx-order-pipe for a table data. But data is again sorting when clicking on the table row. how to disable the sorting with a click?

@VadimDez
Copy link
Owner

Are you modifying any item of the list you're sorting on click? If so - that will trigger sorting.

@giripradip
Copy link
Author

Nope, i am not modifying but i am getting the id of the item that i clicked.

@nicolashedoire
Copy link

nicolashedoire commented Jan 15, 2018

Same problem when i click on the thead tr element... , that trigger sorting, how to solve this bug ?

@giripradip
Copy link
Author

giripradip commented Jan 16, 2018

I am not using this pipe techniques for sorting. In angular, while scrolling the long list change detection event will be triggered. An angular pipe runs its functionality(in this case sorting) on each change detection event. That's why is it flickering while clicking or scrolling also. I am using another technique suggested by many angular developers. That is you can write your sorting logic in the component itself.

@VadimDez
Copy link
Owner

@VadimDez
Copy link
Owner

Could someone test this issue with version 2.0.0?

@stale
Copy link

stale bot commented Jul 31, 2020

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.

@stale stale bot added the stale label Jul 31, 2020
@stale stale bot closed this as completed Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants