-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create address input #8327
Conversation
/> | ||
) | ||
} | ||
return <div>Unsupported field type {fieldDefinition.type}</div> | ||
// return <div>Unsupported field type {fieldDefinition.type}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if unused
return '' | ||
} | ||
if (!options) { | ||
return val as string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any way this could be interpreted?
packages/commons/src/events/utils.ts
Outdated
type | ||
})) | ||
) | ||
pages.map(({ fields }) => fields.map((field) => field as FieldConfig)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the last map does not do anything except cast the value. By removing it, do you think it will be interpreted right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
field satisfies FieldConfig
throws error here. Seems like .default()
in schema has some unexpected effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be my earlier mistake. Seems that we are actually passing in
EventConfig
, not EventConfigInput
export const findPageFields = (config: EventConfig) => {
return flattenDeep(
config.actions.map(({ forms }) =>
forms.map(({ pages }) =>
pages.map(({ fields }) => fields.map((field) => field))
)
)
) satisfies FieldConfig[]
}
Would this work in your case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked!
…vs-core into address-input-v2
No description provided.