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

Table sorting based on async data #193

Open
rkalis opened this issue Feb 19, 2024 · 1 comment
Open

Table sorting based on async data #193

rkalis opened this issue Feb 19, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rkalis
Copy link
Member

rkalis commented Feb 19, 2024

Right now we have a few different pieces of async data in the table that are handled differently.

The approved spender labels are loaded asynchronously (so the rest of the table renders while they are still resolving). This happens through a useQuery in the SpenderCell.tsx file that makes a GET request to retrieve the associated label.

On the other hand, token pricing is loaded in a blocking manner, meaning that it blocks the loading of the rest of the table until pricing information is fetched.

As a result, pricing information can be used for sorting in TanStack Table (since it is included in the data passed into TanStack Table), while spender labels cannot be used for sorting, since the data is retrieved in a separate useQuery. At the same time, pricing information does block the load of the entire table, which is not ideal.

Ideally, we would be able to load this data in a non-blocking manner, while still being able to use this data for sorting/filtering in TanStack Table. I'm not sure how to best tackle this issue though, so help is definitely wanted.

@rkalis rkalis added enhancement New feature or request help wanted Extra attention is needed labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants
@rkalis and others