Merge pull request #9391 from snehaljos/issue9157
Fixed bug in UI | Fix for issue #9157
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Encode the `formData` in the `queryString` using `JSON.stringify` to keep the types in the decoded value
|
||||
@@ -302,7 +302,9 @@ export const TaskPage = ({ loadingText }: TaskPageProps) => {
|
||||
|
||||
navigate(
|
||||
generatePath(
|
||||
`${rootLink()}/templates/:templateName?${qs.stringify({ formData })}`,
|
||||
`${rootLink()}/templates/:templateName?${qs.stringify({
|
||||
formData: JSON.stringify(formData),
|
||||
})}`,
|
||||
{
|
||||
templateName: taskStream.task!.spec.metadata!.name,
|
||||
},
|
||||
|
||||
@@ -128,7 +128,11 @@ export const TemplatePage = ({
|
||||
ignoreQueryPrefix: true,
|
||||
});
|
||||
|
||||
return query.formData ?? {};
|
||||
try {
|
||||
return JSON.parse(query.formData as string);
|
||||
} catch (e) {
|
||||
return query.formData ?? {};
|
||||
}
|
||||
});
|
||||
const handleFormReset = () => setFormState({});
|
||||
const handleChange = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user