From 75405fb19fffbd22b7de050d82f5bcbcf7619878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Matias=CC=8Cko?= Date: Sun, 26 May 2024 22:29:09 +0200 Subject: [PATCH] GeneratedResourceForm - default values fix --- .../GeneratedResourceForm/FormGenerator/FormGenerator.tsx | 2 +- .../Organisms/GeneratedResourceForm/GeneratedResourceForm.tsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Organisms/GeneratedResourceForm/FormGenerator/FormGenerator.tsx b/src/components/Organisms/GeneratedResourceForm/FormGenerator/FormGenerator.tsx index 030b10f..d81e747 100644 --- a/src/components/Organisms/GeneratedResourceForm/FormGenerator/FormGenerator.tsx +++ b/src/components/Organisms/GeneratedResourceForm/FormGenerator/FormGenerator.tsx @@ -37,7 +37,7 @@ export const sortProperties = (properties: PropertiesType) => ) : [] -export const getHref = (parentHref: string, href: string) => `${parentHref !== '' && !parentHref.startsWith('/') ? parentHref + '/' : parentHref}${href}` +export const getHref = (parentHref: string, href: string) => `${parentHref !== '' && !parentHref.endsWith('/') ? parentHref + '/' : parentHref}${href}` const FormGenerator: FC = (props) => { const { dataTestId, href: topHref, properties, resetFormKey, schema, values, onChange, setFormError } = props diff --git a/src/components/Organisms/GeneratedResourceForm/GeneratedResourceForm.tsx b/src/components/Organisms/GeneratedResourceForm/GeneratedResourceForm.tsx index b272199..2a2f3f3 100644 --- a/src/components/Organisms/GeneratedResourceForm/GeneratedResourceForm.tsx +++ b/src/components/Organisms/GeneratedResourceForm/GeneratedResourceForm.tsx @@ -67,6 +67,8 @@ const GeneratedResourceForm: FC = (props) => { } }, [i18n, properties, props]) + console.log(props) + return (