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

Sort direction changing on forceRender #1485

Open
Zambelli24 opened this issue Dec 30, 2024 · 0 comments
Open

Sort direction changing on forceRender #1485

Zambelli24 opened this issue Dec 30, 2024 · 0 comments

Comments

@Zambelli24
Copy link

Zambelli24 commented Dec 30, 2024

Describe the bug
For a server side data table, calling forceRender causes the applied sort direction to always be set to ascending for the selected column. When the sort is already ascending this is fine for the user. When the sort is descending, its unexpectedly flipped. This affects only version 6.2.0. I tested against 6.1.0 as well and the issue is not present.

To Reproduce
Steps to reproduce the behavior:

  1. Create a table with server-side data, pagination, sort, and search configured
  2. Add a way to update the grid using forceRender. In my use case, there is an external filter that adds a new parameter the API calls being made. This could be as simple as a button that just calls forceRender
  3. Run the table and set the sort on any column to be descending
  4. Execute the method to call forceRender
  5. Notice that the sort direction stays on the correct column but flips from ascending to descending

Expected behavior
The sort direction should stay the same whenever forceRender is called regardless of what it was.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: macOS Sonoma 14.4
  • Browser: Chrome
  • Version: 130.0.6723.92 (Official Build) (arm64)

Additional context
This only seems to happen for server-side grids. Client side data sorts are not affected. I followed the sort config defined on the GridJs docs and found that the value for columns inherently has the wrong direction coming back on it when this bug occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant