Skip to content

Commit

Permalink
Add tag slot to taginput (buefy#2209)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Goh Chuan Ching committed Feb 9, 2020
1 parent 9574a47 commit 4fdbf49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/pages/components/taginput/api/taginput.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ export default [
name: '<code>header</code>',
description: 'Show a custom header as first option',
props: '—'
},
{
name: '<code>tag</code>',
description: 'For customizing content in tag item.',
props: '<code>tag: String|Number|Object</code>'
}
],
events: [
Expand Down
4 changes: 3 additions & 1 deletion src/components/taginput/Taginput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
:closable="closable"
:title="ellipsis && getNormalizedTagText(tag)"
@close="removeTag(index)">
{{ getNormalizedTagText(tag) }}
<slot name="tag" :tag="tag">
{{ getNormalizedTagText(tag) }}
</slot>
</b-tag>

<b-autocomplete
Expand Down

0 comments on commit 4fdbf49

Please sign in to comment.