DEV: Standardize table sorting verbiage (#9757)

* DEV: Standardize table sorting verbiage

This commit creates a common component that tables can use to make their
headers sortable. This commit also standardizes on using `desc` as the
default and passing in the `asc=true` flag to adjust the sorting
direction.

* Add deprecation warnings

Adds deprecation warnings if using previous params and maintains
backwards compatibility. Set the default sort value for group members to
be asc.

* switch group requests to use common table-header-toggle

* update fixture
This commit is contained in:
Blake Erickson
2020-05-14 20:10:59 -06:00
committed by GitHub
parent 11cd149122
commit 1a2b9435b0
18 changed files with 49 additions and 106 deletions

View File

@ -620,7 +620,7 @@ export function applyDefaultHandlers(pretender) {
});
}
const ascending = request.queryParams.ascending;
const asc = request.queryParams.asc;
const order = request.queryParams.order;
if (order) {
@ -629,7 +629,7 @@ export function applyDefaultHandlers(pretender) {
});
}
if (ascending) {
if (asc) {
store = store.reverse();
}