Added array operations

This commit is contained in:
2017-10-12 12:07:17 +02:00
parent 77d458eb13
commit 6d0b2ccdf6
3 changed files with 29 additions and 10 deletions

View File

@ -22,11 +22,11 @@ component InputTags(id string, value []string, label string)
.widget-section
label(for=id)= label + ":"
.tags(id=id)
each tag in value
for index, tag := range value
.tag
span.tag-title= tag
.tag-remove.action(data-action="removeTag", data-trigger="click", data-tag=tag) x
.tag-remove.action(data-action="arrayRemove", data-trigger="click", data-field=id, data-index=index) x
button.tag-add
button.tag-add.action(data-action="arrayAppend", data-trigger="click", data-field=id)
RawIcon("plus")