You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.
[x] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Documentation issue or request
Description
I'd like to have some kind of custom component example for auto-form that doesn't actually live in the auto-form package. Mostly as advertising that it's a thing that can be done :-)
I think ideally a custom auto-form component would live in the syndesis package, however I did find when I started to create one that the problem is we don't want to have pf3 FormGroup and other related components being imported into syndesis. So maybe the ui package is a better place to keep custom form components? That'd mean making auto-form a dependency of the ui, unless I extract out the auto-form interfaces and types into a separate package.
Basically a custom form component is just UI component that uses the field.onChange, field.onBlur or form.setFieldValue props passed in by Formik to update the property value when appropriate. Technically I'd call the "duration" control an example of a custom component really but I already baked it into auto-form.
Yeah maybe like @syndesis/autoform-pf3, @syndesis/autoform-pf4 I guess perhaps would be handy at migration time certainly.
My other thought was perhaps this map could be passed in externally via a prop, then the app can basically just tell autoform exactly what widget to use. Could even do it via overriding things in that customComponents prop.
If we think #160 would be super-helpful we might wind up kinda having to do a similar thing as part of supporting that component, or just not make it part of auto-form and instead make it part of the app.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a...
Description
I'd like to have some kind of custom component example for auto-form that doesn't actually live in the auto-form package. Mostly as advertising that it's a thing that can be done :-)
I think ideally a custom auto-form component would live in the
syndesis
package, however I did find when I started to create one that the problem is we don't want to have pf3FormGroup
and other related components being imported intosyndesis
. So maybe theui
package is a better place to keep custom form components? That'd mean makingauto-form
a dependency of theui
, unless I extract out theauto-form
interfaces and types into a separate package.@riccardo-forina thoughts?
The text was updated successfully, but these errors were encountered: