Skip to content
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

[Bug] Reference fields do not work inside Embedded List #1145

Closed
dowlingw opened this issue Jul 5, 2016 · 4 comments
Closed

[Bug] Reference fields do not work inside Embedded List #1145

dowlingw opened this issue Jul 5, 2016 · 4 comments

Comments

@dowlingw
Copy link
Contributor

dowlingw commented Jul 5, 2016

ng-admin version: 0.9.1

Using reference fields inside an embedded_list does not appear to work correctly.

Reading the guide, it's not clear whether this is supported behaviour:

Ng-admin renders embedded_list fields as a datagrid in read context (showView), and as a list of embedded forms in write context (creationView and editionView). This won't issue any additional query to the REST API, since the related entities are already embedded.

And in practice this seems to be inconsistently implemented:

  1. showView does not perform any retrievals of reference objects for rendering
  2. creationView and editionView both load listings and perform remote completion as expected
  3. editionView does not retrieve the reference object for rendering. However if the object is returned in the listing of objects used to render the dropdown, this does work as expected.
  4. If this is not supported configuration, then there are no errors thrown from the nga object when providing an invalid configuration.

I'm hoping the intent is for this to work, as most of the functionality works already. In which case it looks like this might be a small bug rendering reference fields in the scope of an embedded_list.

If not, it would be good to clarify the documentation and possibly generate a warning or error from the configuration API in this situation.

@dowlingw
Copy link
Contributor Author

dowlingw commented Jul 5, 2016

This looks like it might be a duplicate or related to #817 or #956.
Sorry, I did have a look at the bug tracker - but didn't include closed bugs.

I'll have to see if this is fixed in the 1.0 alphas, though I've had other issues trying those out :(

@dowlingw
Copy link
Contributor Author

dowlingw commented Jul 6, 2016

Confirming this is still an issue in 1.0.0-alpha4

@etdev
Copy link

etdev commented Jul 6, 2016

There's also #786.

I'd like to try and implement this if anyone can offer a high-level explanation of how to do so (i.e. what files need to be updated etc.)

@dowlingw
Copy link
Contributor Author

dowlingw commented Jul 7, 2016

Yes, this looks like a duplicate of #786
Closing and adding notes there.

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

No branches or pull requests

2 participants