From 66352e1b8d83eabb0b2fc361a4f479a3327edb7b Mon Sep 17 00:00:00 2001 From: Richard Bradley Date: Wed, 3 Aug 2016 13:47:27 +0100 Subject: [PATCH] #1158 allow full-row field templates in embedded view --- doc/Relationships.md | 5 +++++ src/javascripts/ng-admin/Crud/field/maEmbeddedListField.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/Relationships.md b/doc/Relationships.md index f19cab31..cbf0d592 100644 --- a/doc/Relationships.md +++ b/doc/Relationships.md @@ -223,6 +223,11 @@ When displaying a post: ![embedded_list in editionView](images/embedded_list_in_editionView.png) +Caution: If you want to use [`Field.template()`](./Theming.md#customizing-the-template-for-a-given-field) +to customise the view of an embedded field, be aware that the default "" template string takes +different attribute values in embedded view to the regular view. +See the [maEmbeddedListField source](../src/javascripts/ng-admin/crud/field/maEmbeddedListField.js). + ## Embedded entity APIs may render a many-to-one relationship by embedding the related entry in the main entry: diff --git a/src/javascripts/ng-admin/Crud/field/maEmbeddedListField.js b/src/javascripts/ng-admin/Crud/field/maEmbeddedListField.js index 7374a94b..4131336c 100644 --- a/src/javascripts/ng-admin/Crud/field/maEmbeddedListField.js +++ b/src/javascripts/ng-admin/Crud/field/maEmbeddedListField.js @@ -59,7 +59,7 @@ export default function maEmbeddedListField() {
 
-
+