From 94df6c20a0a78c291568557311ae2126bcd500d8 Mon Sep 17 00:00:00 2001 From: Pablo Casares Crespo Date: Tue, 23 Apr 2024 13:26:52 +0200 Subject: [PATCH] Fix LaunchPlan filter Signed-off-by: Pablo Casares Crespo --- .../oss-console/src/components/Entities/EntityInputs.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/oss-console/src/components/Entities/EntityInputs.tsx b/packages/oss-console/src/components/Entities/EntityInputs.tsx index 8eab842de..3b6259ea1 100644 --- a/packages/oss-console/src/components/Entities/EntityInputs.tsx +++ b/packages/oss-console/src/components/Entities/EntityInputs.tsx @@ -14,6 +14,8 @@ import styled from '@mui/system/styled'; import CheckIcon from '@mui/icons-material/Check'; import ExpandLess from '@mui/icons-material/ExpandLess'; import ExpandMore from '@mui/icons-material/ExpandMore'; +import { executionSortFields } from '../../models/Execution/constants'; +import { SortDirection } from '@clients/common/types/adminEntityTypes'; import { FilterOperationName } from '@clients/common/types/adminEntityTypes'; import { useLaunchPlans } from '../hooks/useLaunchPlans'; import { formatType, getInputDefintionForLiteralType } from '../Launch/LaunchForm/utils'; @@ -69,6 +71,11 @@ interface Input { export const EntityInputs: React.FC<{ id: ResourceIdentifier; }> = ({ id }) => { + const sort = { + key: executionSortFields.createdAt, + direction: SortDirection.DESCENDING, + }; + const launchPlanState = useLaunchPlans( { project: id.project, domain: id.domain }, { @@ -80,6 +87,7 @@ export const EntityInputs: React.FC<{ value: id.name, }, ], + sort, }, );