One thing we still can't do in v2 is attach groupings to our form fields. Like we have <field.Layout.Row> and <field.Layout.Stack> but we can't just add bare objects to fieldComponents on type level so we now make them a component that doesn't do anything and then attach Row and Stack to it:
export function Layout() {
return null;
}
Layout.Row = ...
Layout.Stack = ...
It works at runtime, I think it's just a type mismatch that fieldComponents expects things that return jsx, but I think it would be great if we could add groups like this:
fieldComponents: {
Layout: {
Row, Stack
}
}
as long as the last thing is a component..
One thing we still can't do in v2 is attach groupings to our form fields. Like we have
<field.Layout.Row>and<field.Layout.Stack>but we can't just add bare objects tofieldComponentson type level so we now make them a component that doesn't do anything and then attach Row and Stack to it:It works at runtime, I think it's just a type mismatch that
fieldComponentsexpects things that return jsx, but I think it would be great if we could add groups like this:as long as the last thing is a component..