-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support sorting in TokensTable (#6273)
# Motivation We want to allow people to sort the tokens table based on name or balance. The tokens table is used on the tokens page but also on the ICP accounts page. On the accounts page we don't want to enable sorting. This PR supports sorting in the tokens table be specifying the `order` prop on the `TokensTable` component. We should not specify this prop on the accounts page. On the tokens page we would use the `$tokensTableOrderStore` as the `order prop to persist the order between navigation. BUT! We can not enable this on the tokens page yet either because the sort button on mobile interferes with the settings button for "hide zero balances". So this PR only supports the functionality in the component but does not yet enable it on the page. # Changes 1. Support sorting based on either balance or title in the `TokensTable` component, if the `order` prop is specified to indicate the order that should be used. # Tests 1. Unit tests added. 2. Tested manually after passing `$tokensTableOrderStore` as the `order` prop. # Todos - [ ] Add entry to changelog (if necessary). not yet
- Loading branch information
Showing
2 changed files
with
214 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters