mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
fix(stack): prepopulate when creating template from stack EE-6853 (#11379)
This commit is contained in:
parent
d9ae249ffe
commit
f15be1d92a
2 changed files with 6 additions and 2 deletions
|
@ -23,6 +23,10 @@ export function useInitialValues({
|
|||
|
||||
const { appTemplateId, type = defaultType } = useAppTemplateParams();
|
||||
|
||||
const {
|
||||
params: { fileContent = '' },
|
||||
} = useCurrentStateAndParams();
|
||||
|
||||
const fileContentQuery = useFetchTemplateFile(appTemplateId);
|
||||
if (fileContentQuery.isLoading) {
|
||||
return undefined;
|
||||
|
@ -30,7 +34,7 @@ export function useInitialValues({
|
|||
|
||||
return {
|
||||
Title: '',
|
||||
FileContent: fileContentQuery.data ?? '',
|
||||
FileContent: (fileContentQuery.data ?? '') || fileContent,
|
||||
Type: type,
|
||||
Platform: Platform.LINUX,
|
||||
File: undefined,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue