-
-
Notifications
You must be signed in to change notification settings - Fork 683
[v2]: make fieldComponents less strict to allow grouping #2360
Copy link
Copy link
Open
Labels
area: typesThis issue affects the types of the library.This issue affects the types of the library.scope: reactThis issue specifically affects the react adapter.This issue specifically affects the react adapter.type: enhancementThis requests an enhancement to existing behaviour.This requests an enhancement to existing behaviour.v2This issue affects v2 as well.This issue affects v2 as well.
Description
Activity
Metadata
Metadata
Assignees
Labels
area: typesThis issue affects the types of the library.This issue affects the types of the library.scope: reactThis issue specifically affects the react adapter.This issue specifically affects the react adapter.type: enhancementThis requests an enhancement to existing behaviour.This requests an enhancement to existing behaviour.v2This issue affects v2 as well.This issue affects v2 as well.
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..