Since Strapi v4.5 was released, it introduced breaking changes to how relations inputs and their data are handled. This PR will bring the menus plugin up-to-date with the latest changes to relations in Strapi.
Remaining tasks
For anyone watching, this is going through more than expected to meet the requirements for new relations input field and state management. It's getting there slowly but surely 👍🏻
[x] Bump peer dependencies for Strapi v4.5.x
[x] Replace SelectWrapper components with new RelationInput components from Strapi core.
[x] Update relation metadata for form layouts with relation fields.
[x] Clone and modify the content manager /relations route and controller methods.
[x] Update connect and disconnect functions for relation fields in EditViewDataProvider.
[x] Ensure relation field values use an empty array by default instead of null.
[x] Update onSubmit to format relations data with connect/disconnect fields.
[x] Update loadRelation to update initialData in EditViewDataProvider to allow dirty state comparison.
[x] Use menu item id instead of root menu id for various keys and URLs.
[x] Ensure relations are refreshed after saving the edit view.
[x] Ensure relations are disconnected properly.
[x] Ensure relations are cloned properly.
[x] Ensure relations are not excessively re-fetched.
Since Strapi v4.5 was released, it introduced breaking changes to how relations inputs and their data are handled. This PR will bring the menus plugin up-to-date with the latest changes to relations in Strapi.
Remaining tasks
For anyone watching, this is going through more than expected to meet the requirements for new relations input field and state management. It's getting there slowly but surely 👍🏻
SelectWrapper
components with newRelationInput
components from Strapi core./relations
route and controller methods.EditViewDataProvider
.null
.onSubmit
to format relations data withconnect/disconnect
fields.loadRelation
to updateinitialData
inEditViewDataProvider
to allow dirty state comparison.id
instead of root menuid
for various keys and URLs.