You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.
In my project, I'm trying to make the pagination persistent between different views. For the most part, I got it working, but for some reason, the sorting is not working right, every time I set the sorting using table.apiEvent sortBy, order is always "desc", even If I hardcode it to be "asc"
What I do is get the pagination and sorting from the "OnPagination" and "OnOrder" events (just like server pagination demo), then I stored it in a provider and retrieve it when needed (in this case, in the ngAfterViewInit).
The result is that I get always a "desc" in order, I tried hardcoding asc with no results, the table just fire a "OnOrder" event with a "desc" value when setting the sortBy using the table.apiEvent. I don't know if I'm doing something wrong or the Table is not working properly :/
thanks in advance!
The text was updated successfully, but these errors were encountered:
piscisferro
changed the title
table.apiEvent sortBy nor working properly
table.apiEvent sortBy not working properly?
Jan 16, 2020
I think the problem is that the orderBy function sets the order by calling setColumnOrder (the function that is used to flip the state from asc to desc and vice versa), ignoring the order value that was stored in the local storage.
RJiraya
pushed a commit
to RJiraya/ngx-easy-table
that referenced
this issue
Oct 25, 2021
Hi!
In my project, I'm trying to make the pagination persistent between different views. For the most part, I got it working, but for some reason, the sorting is not working right, every time I set the sorting using table.apiEvent sortBy, order is always "desc", even If I hardcode it to be "asc"
Code example:
What I do is get the pagination and sorting from the "OnPagination" and "OnOrder" events (just like server pagination demo), then I stored it in a provider and retrieve it when needed (in this case, in the ngAfterViewInit).
The result is that I get always a "desc" in order, I tried hardcoding asc with no results, the table just fire a "OnOrder" event with a "desc" value when setting the sortBy using the table.apiEvent. I don't know if I'm doing something wrong or the Table is not working properly :/
thanks in advance!
The text was updated successfully, but these errors were encountered: