-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
onPage event emitted when sorting single column #6734
Comments
I expect to receive a LazyLoadEvent on sorting, so that I can fetch the page records from backend. |
I have the same problem with PrimeNG version: 7.1.2 |
Now, I found in the documentation
That means when you use |
Have you resolve this issue? How can we separate sort from another event? |
@fhljys if you use lazy-mode, then you can use |
@fhljys I guess you will have to use the workaround in that issue then - keep the last LazyLoadEvent in your component state, and check against it when the next event occurs to see if it should be discarded. AFAIK, no other event will be fired on column sort in lazy mode. |
Finally, I decided to give up the p-sortIcon and write my own sort event handler. Then I just need to check the event.first to decide whether I should discarded this event. |
It is suggested to do the loading at onLazyLoad in a lazy table, sorting |
I'm submitting a ... (check one with "x")
Code example
Definition of my table :
In TS the 2 callback functions :
Current behavior
When using sorting and paging with lazy loading, column sorting action emits an onPage event.
Edit: More exactly, the event emitted is well a Sor Event object but callback method called is the one defined for the LazyLoadEvent, while it should be
Similar to #3408 but with TurboTable and in version 6.1.4
Expected behavior
Sorting action hsould emit a SortEvent and call associated callback function
Minimal reproduction of the problem with instructions
Create a turbotable with both sorting and paging events and associated functions.
Please tell us about your environment:
Angular version: 6.1.0
PrimeNG version: 6.1.4
Browser: Chrome 60. Didn't test for other browsers
Language: TypeScript 2.7.2
Node (for AoT issues): 8.12
The text was updated successfully, but these errors were encountered: