0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00

Merge pull request #6533 from acburdine/issue-6483

Pass post tags as array to ember-cli-selectize
This commit is contained in:
Kevin Ansfield 2016-02-18 09:08:09 +00:00
commit b0f4a0391d
2 changed files with 6 additions and 1 deletions

View file

@ -174,6 +174,11 @@ export default Controller.extend(SettingsMenuMixin, {
this.set('debounceId', debounceId);
},
// this exists because selectize throws errors on transition if it doesn't
existingTags: computed('model.tags.[]', function () {
return this.get('model.tags').toArray();
}),
// live-query of all tags for tag input autocomplete
availableTags: computed(function () {
return this.get('store').filter('tag', {limit: 'all'}, () => {

View file

@ -41,7 +41,7 @@
{{gh-selectize
id="tag-input"
multiple=true
selection=model.tags
selection=existingTags
content=availableTags
optionValuePath="content.uuid"
optionLabelPath="content.name"