Skip to content

Fix conflicting keys on dynamic zone#31

Open
Freyb wants to merge 2 commits into
Barelydead:mainfrom
Freyb:main
Open

Fix conflicting keys on dynamic zone#31
Freyb wants to merge 2 commits into
Barelydead:mainfrom
Freyb:main

Conversation

@Freyb
Copy link
Copy Markdown

@Freyb Freyb commented Apr 25, 2023

As was described in #28 if multiple components share the same attribute name in a dynamic zone, components that are higher on the component list might not get their attributes populated.

Strapi provides two way to populate dynamic zones. As described by the docs:

When populating dynamic zones, you can choose between:

  • a shared population strategy, applying a unique behavior for all the dynamic zone's components
  • or a detailed population strategy, defining per-component populate queries using the on property.

https://docs.strapi.io/dev-docs/api/rest/populate-select#components--dynamic-zones

This PR fixes this issue by utilizing the on keyword in dynamic components

@Levy-from-Odessa
Copy link
Copy Markdown

Great fix, Thanks
@Barelydead could you merge it, pls?

@Freyb
Copy link
Copy Markdown
Author

Freyb commented Jun 14, 2023

@Barelydead Could you check it and merge it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants