Skip to content
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

Merged
merged 67 commits into from
Jan 20, 2025
Merged

feat: create address input #8327

merged 67 commits into from
Jan 20, 2025

Conversation

jamil314
Copy link
Collaborator

No description provided.

jamil314 and others added 30 commits January 1, 2025 18:48
@jamil314 jamil314 changed the base branch from feat-birth-v2 to develop January 16, 2025 14:09
/>
)
}
return <div>Unsupported field type {fieldDefinition.type}</div>
// return <div>Unsupported field type {fieldDefinition.type}</div>
Copy link
Collaborator

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
Copy link
Collaborator

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?

type
}))
)
pages.map(({ fields }) => fields.map((field) => field as FieldConfig))
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked!

@jamil314 jamil314 merged commit 235b256 into develop Jan 20, 2025
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants