[RFR] Introducing the embedded_list field type#714
Merged
fzaninotto merged 12 commits intomasterfrom Oct 20, 2015
Merged
Conversation
And fix date field formatting, too
Closed
The previous version was barely readable. Adding more details about how each field type maps the REST API
Member
Author
|
Switching to RFR |
|
Hello :) Even with a .choice field the value sent to server is "null" in creationView and in Edition. |
Member
Author
|
I can reproduce the bug with boolean field but not with choice field. For the boolean field bug, maybe it's related to #736, let's see if fixing that one helps. |
Member
Author
|
@fzaninotto Thanks for the update :). |
fzaninotto
added a commit
that referenced
this pull request
Oct 20, 2015
[RFR] Introducing the embedded_list field type
This was referenced Nov 3, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new
embedded_listtype maps an array of objects inside an entry, e.g.{ "id":1, "title":"Accusantium qui nihil voluptatum quia voluptas maxime ab similique", "comments":[ { "author":{ "name":"Edmond Schulist" }, "body":"I ought to tell me your history, you know,' the Hatter and the happy summer days. THE.", "created_at":"2012-08-07" }, { "author":{ "name":"Logan Schowalter" }, "body":"I don't want to be?' it asked. 'Oh, I'm not Ada,' she said, 'and see whether it's marked \"poison\" or not'; for she had asked it aloud; and in despair she put her hand on the end of the.", "created_at":"2012-08-05" } ] }You can now map the
commentsfield:This will display in the show view as a datagrid, exactly like
referenced_list.And in an editionView like nested forms:
Of course, embedded entries don't require an entity. If they only live inside another entry, simply don't set the
targetEntity. In that case, there can be nodetailLinkor defaultlistActions, as there is noEntityto link to.embedded_listfields support sorting and filtering:This is a long-requested feature, and it should fix numerous issues (#241, #308, #627, #666)