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

upcoming: [DI-21814] - ACLP UI - DBaaS instances order by label #11226

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

ACLP UI - DBaaS instances order by label ([#11226](https://github.com/linode/manager/pull/11226))
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,21 @@ export const CloudPulseResourcesSelect = React.memo(
const platformFilter =
resourceType === 'dbaas' ? { platform: 'rdbms-default' } : {};

const orderFilter: Partial<Filter> =
resourceType === 'dbaas' ? { '+order': 'asc', '+order_by': 'label' } : {};

const { data: resources, isLoading, isError } = useResourcesQuery(
disabled !== undefined ? !disabled : Boolean(region && resourceType),
resourceType,
{},
xFilter
? {
...platformFilter,
...xFilter,
...orderFilter, // order by filter
...platformFilter, // platform is a top level filter
...xFilter, // the usual xFilters
}
: {
...orderFilter,
...platformFilter,
region,
}
Expand Down