Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Fix form fields value getter #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/form/layouts/card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export const CardLayout: React.FC<LayoutProps> = (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
}
})

Expand Down