FIX: regression where tag could not be deleted with click

This commit is contained in:
Joffrey JAFFEUX 2018-04-04 00:56:45 +02:00 committed by GitHub
parent 88e4c0ec3a
commit b1cc368da8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,7 @@ export default ComboBox.extend(Tags, {
this.$(".select-kit-body").on("click.mini-tag-chooser", ".selected-tag", (event) => {
event.stopImmediatePropagation();
this.destroyTags($(event.target).attr("data-value"));
this.destroyTags(this.computeContentItem($(event.target).attr("data-value")));
});
this.$(".select-kit-header").on("focus.mini-tag-chooser", ".selected-name", (event) => {
@ -184,6 +184,7 @@ export default ComboBox.extend(Tags, {
destroyTags(tags) {
tags = Ember.makeArray(tags).map(c => get(c, "value"));
// work around usage with buffered proxy
// it does not listen on array changes, similar hack already on select
// TODO: FIX buffered-proxy.js to support arrays