From 232033af07da1c7550815ed029891aa35c5f59cc Mon Sep 17 00:00:00 2001 From: Ulrich Anani Date: Thu, 9 Jun 2022 14:30:12 +0100 Subject: [PATCH] Fix form fields value getter --- components/form/layouts/card/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/form/layouts/card/index.tsx b/components/form/layouts/card/index.tsx index 76d108f8..a28d3265 100644 --- a/components/form/layouts/card/index.tsx +++ b/components/form/layouts/card/index.tsx @@ -52,10 +52,10 @@ export const CardLayout: React.FC = (props) => { ? fieldTypes[field.type].parseValue(field.defaultValue) : null - defaults[`@${field.id}`] = form.getFieldValue([field.id, 'value']) ?? defaultValue + defaults[`@${field.id}`] = form.getFieldValue([field.id]) ?? defaultValue if (field.slug) { - defaults[`$${field.slug}`] = form.getFieldValue([field.id, 'value']) ?? defaultValue + defaults[`$${field.slug}`] = form.getFieldValue([field.id]) ?? defaultValue } })