0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -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.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 // live-query of all tags for tag input autocomplete
availableTags: computed(function () { availableTags: computed(function () {
return this.get('store').filter('tag', {limit: 'all'}, () => { return this.get('store').filter('tag', {limit: 'all'}, () => {

View file

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