Skip to content

feat(react-form-utils): add react contextes for entities and relations

Arnaud Vergnet requested to merge topic/default/rfu-context into branch/default

The entity context can be used as base for form and display layouts to allow easy access to the entity type/values to child components.

The relation definition context can be used as a base for building complex relation input components. As a relation type can have several objects, the context accepts an array of relation definition (See issue cubicweb#817). As relation input components can be rather complex, this context avoids prop drilling on the relation type schema. Compared to the entity context, the relation context does not allow storing relation values as it was only used in forms where values are handled by the form framework (display components were simpler and thus did not need this context). If the need arises we can update the context.

Linked to cubicweb#858 (closed)

Edited by Arnaud Vergnet

Merge request reports