-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Use CustomAutoField example with nested fields? #181
Comments
Well, it's not a bug, rather a new feature. Currently, |
Hey, @Gervwyk! It've been a while, but I've finally came to an idea. I'd introduce const CustomAuto = props => ...;
const CustomAutoField = connectField(CustomAuto, {autoField: true, ensureValue: false, includeInChain: false, initialValue: false}); It will mark this field as an <AutoField name="x">
<Auto name="x" ...>
<CustomAutoField name="x" ...>
<CustomAuto name="x" ...>
...
</CustomAuto>
</CustomAutoField>
</Auto>
</AutoField> Yep, that's it. We can't replace usage of default What do you think? |
Other idea. const schema = new SimpleSchema({
tags: {
type: [String],
uniforms: {
itemProps: {
component: CustomAutoField
}
}
}
});
// Then...
<AutoForm autoField={CustomAutoField} schema={schema} /> Will work as expected. |
Great! The second option seems easy to implement and fits well with current model. Thanks! Guess this one is finally resolved. |
I'm trying to implement the CustomAutoField example but having trouble with with nested fields since
CustomAuto
is not called for nested fields. Schema definitions like:and
Although works well for top level fields. Is there a better way to do this? or why is
CustomAutoField
not executed for nested fields?I tested this for BS3 and antd theme.
The text was updated successfully, but these errors were encountered: