diff --git a/packages/shared/src/components/Apps/AppForms/AppBaseInfoForm/BasicInfoForm/index.tsx b/packages/shared/src/components/Apps/AppForms/AppBaseInfoForm/BasicInfoForm/index.tsx index 618c40b8793..df73215cfc0 100644 --- a/packages/shared/src/components/Apps/AppForms/AppBaseInfoForm/BasicInfoForm/index.tsx +++ b/packages/shared/src/components/Apps/AppForms/AppBaseInfoForm/BasicInfoForm/index.tsx @@ -45,7 +45,10 @@ export function BasicInfoForm({ }: Props): JSX.Element { const { workspace } = useParams(); const [initData, setInitData] = useState>(); - const { data: versions } = useAppVersionList({ appName }, { status: versionStatus }); + const { data: versions } = useAppVersionList( + { appName }, + { status: versionStatus, order: 'versionName' }, + ); const sortedVersions = useMemo( () => (versions || []) diff --git a/packages/shared/src/components/Apps/AppVersionSelector/index.tsx b/packages/shared/src/components/Apps/AppVersionSelector/index.tsx index 38f34b2ffc2..75421e239c2 100644 --- a/packages/shared/src/components/Apps/AppVersionSelector/index.tsx +++ b/packages/shared/src/components/Apps/AppVersionSelector/index.tsx @@ -28,10 +28,15 @@ export function AppVersionSelector({ selectedVersionChange, }: Props): JSX.Element { const [selectedVersion, setSelectedVersion] = useState(''); - const { data: versions = [] } = useAppVersionList({ - workspace, - appName: appDetail.metadata.name, - }); + const { data: versions = [] } = useAppVersionList( + { + workspace, + appName: appDetail.metadata.name, + }, + { + order: 'versionName', + }, + ); const versionOptions = useMemo(() => { return versions?.map(({ metadata, spec }) => ({ label: spec.versionName,