Skip to content

Commit

Permalink
Document default-value attribute in <ma-create-button>
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Oct 16, 2015
1 parent ba8398f commit 51ea070
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion doc/Reusable-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ entity.listView().fields([

A button linking to the related view for the given entity.

Note that `<ma-create-button>` supports default values for the entity to create. This enables the creation of an with a prefilled relationship:

```js
post.editionView()
.fields([
...
nga.field('').label('')
.template('<ma-create-button entity-name="comments" size="sm" label="Create related comment" default-values="{ post_id: entry.values.id }"></ma-create-button></span>')
]);
```

* `<ma-filtered-list-button>`

A button linking to an entity list view, prefiltered.
Expand Down Expand Up @@ -62,4 +73,3 @@ listView.listActions([
'</ma-delete-button>'
]);
```

0 comments on commit 51ea070

Please sign in to comment.