-
Notifications
You must be signed in to change notification settings - Fork 63
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
Generate input fields for custom types in connected forms #924
Comments
Hey,👋 thanks for raising this! I'm going to transfer this over to our codegen repository for better assistance 🙂 |
Hi @chultquist 👋 thanks for raising this issue. I think I was able to reproduce the behavior you described. Here are my repro steps:
const schema = a.schema({
Installation: a
.model({
location: a.customType({
lat: a.float(),
lon: a.float(),
}),
victronConfiguration: a.customType({
installationId: a.string(),
portalId: a.string(),
}),
planes: a.hasMany("Plane", "installationId"),
})
.authorization((allow) => [allow.guest()]),
Plane: a.model({
name: a.string(),
azimuth: a.integer().required(),
declination: a.integer().required(),
kwp: a.float().required(),
}),
});
Because there are no other fields in the However, I'm not certain whether this is unexpected behavior or not. I will reach out to the team to find out and label this issue either as a bug or feature request accordingly once I found out. |
Thanks, @chrisbonifacio! |
We're categorizing this as a bug because we expect this behavior to work per some of our internal testing. |
Environment information
Describe the feature
When generating connected forms using
npx ampx generate forms
, the resulting forms should include elements for custom types.Use case
One of my models has a few custom types, for example:
The connected forms generation is really helpful, except that it does not include form elements for custom types like the ones shown above. It would be really useful if it did. For arrays, what would be particularly handy is the ability to also add/remove elements from the array (see the "planes" element above).
The text was updated successfully, but these errors were encountered: