-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Custom Entities to Use EntityProvider #27859
Comments
you can find a solution here.... https://wordpress.stackexchange.com/questions/352500/get-post-from-custom-rest-endpoint-in-gutenberg |
The solution @yoscbd provided above does work, and I have implemented my own custom entities as well. Therefore, I am going to close this out. |
Thank you for the link, however the solution linked does not address my original report (and I mention the ability to register entities with Yes, you can register custom entities for use by some hooks/functions, but not all. My original issue is support for
|
@ndiego is it possible to reopen this so it remains visible? The original report is still a reproducible issue and blocker for things like #43751 (comment) |
Yes, absolutely! |
Is your feature request related to a problem? Please describe.
core-data
only creates context for default entities: https://github.com/WordPress/gutenberg/blob/master/packages/core-data/src/entity-provider.js#L20-L26However, custom entities can be added with the
addEntities
action. These entities then not seen as valid byuseEntityProp()
.Describe the solution you'd like
Instead of pulling from a static list of entities, all registered entities should be given context.
Describe alternatives you've considered
Currently I have duplicated
entity-provider.js
and reference the local provider vs. Gutenberg's when using a custom entity.The text was updated successfully, but these errors were encountered: