Icu 18518 UI add sorting support to cache daemon handler (#3168)
* feat: 🎸 add sorting support & sort feature on targets name column * test: 💍 cleanup and add tests * refactor: 💡 remove log * fix: 🐛 dont add undefined/null values from sort to query ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-18518
This commit is contained in:
1 parent
9e069ffc0c
commit
772857dbad
7 files changed
+192
-92
No files matched your search
@@ -101,6 +101,14 @@ export default class CacheDaemonHandler {
|
||||
const token = sessionData?.token;
|
||||
const resourceName = resourceNames[type];
|
||||
|
||||
if (remainingQuery.query?.sort) {
|
||||
const { attribute, direction } = remainingQuery.query.sort;
|
||||
if (attribute && direction) {
|
||||
remainingQuery.sort_by = attribute;
|
||||
remainingQuery.sort_direction = direction;
|
||||
}
|
||||
}
|
||||
|
||||
remainingQuery = {
|
||||
...remainingQuery,
|
||||
query: searchQuery,
|
||||
|
||||
Reference in new issue
Block a user