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

ui.table setting for default "reverse" option #607

Closed
Tracked by #77
dsmmcken opened this issue Jul 5, 2024 · 1 comment · Fixed by #629
Closed
Tracked by #77

ui.table setting for default "reverse" option #607

dsmmcken opened this issue Jul 5, 2024 · 1 comment · Fixed by #629
Assignees

Comments

@dsmmcken
Copy link
Contributor

dsmmcken commented Jul 5, 2024

No description provided.

@dsmmcken dsmmcken mentioned this issue Jul 5, 2024
17 tasks
@mattrunyon
Copy link
Collaborator

Order of sort/reverse does matter in the engine; however, we don't have the option to reverse before sorting in the web UI. Reverse pre/post sort is wired up in IrisGrid, but looks like pre-sort is never used

Just a snippet showing order does matter

from deephaven import empty_table

t = empty_table(100).update(["X=i", "Y=i%2==0 ? 0 : 1"])
no_reverse = t.sort("Y")
pre = t.reverse().sort("Y")
post = t.sort("Y").reverse()

mattrunyon added a commit that referenced this issue Jul 16, 2024
Fixes #607

The concern I had about reverse/sort order is that it does matter, but
we only apply a post-sort reverse in the UI via the reverse action.

We do however not have that plumbed up properly in IrisGrid (we define
pre-sort, but don't use it and don't properly apply the reverse pre-sort
if it's specified). But it works for what we want in ui.table

```py
from deephaven import ui
from deephaven.plot import express as dx

_stocks = dx.data.stocks()

stocks_reversed = ui.table(
    _stocks,
    reverse=True
)
```
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

Successfully merging a pull request may close this issue.

2 participants