So, I am using bootstrap-tags from http://ift.tt/17LHwX5. I am trying to implement the tags into an Ember component which currently looks like this:
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'input',
classNames: null,
value: null,
initTagsInput() {
const $el = this.$();
const _this = this;
$el.tag({
placeholder: 'enter associated plasmids',
beforeAddingTag: function(tag){ //here is my problem I think?
this.set('value', tag);
}
})
},
didInsertElement() {
this._super();
this.initTagsInput();
}
});
The problem I am having is trying to set the value, but when I check my console or ember debugger, no value is every being assigned (value is null still). It's like the beforeAddingTag never works! I am pretty new to ember so any clarity on wrapping this library will help.
Aucun commentaire:
Enregistrer un commentaire