FIX: regression preventing backspace to work on mini-tag-chooser

This commit is contained in:
Joffrey JAFFEUX 2018-04-02 22:42:20 +02:00 committed by GitHub
parent d690ae0281
commit 017f5c1aee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ export default ComboBox.extend(Tags, {
} }
tags.map((tag) => { tags.map((tag) => {
const isHighlighted = highlightedSelection.includes(tag); const isHighlighted = highlightedSelection.map(s => get(s, "value")).includes(tag);
output += ` output += `
<button aria-label="${tag}" title="${tag}" class="selected-tag ${isHighlighted ? 'is-highlighted' : ''}" data-value="${tag}"> <button aria-label="${tag}" title="${tag}" class="selected-tag ${isHighlighted ? 'is-highlighted' : ''}" data-value="${tag}">
${tag} ${tag}
@ -183,7 +183,7 @@ export default ComboBox.extend(Tags, {
}, },
destroyTags(tags) { destroyTags(tags) {
tags = Ember.makeArray(tags); tags = Ember.makeArray(tags).map(c => get(c, "value"));
// work around usage with buffered proxy // work around usage with buffered proxy
// it does not listen on array changes, similar hack already on select // it does not listen on array changes, similar hack already on select
// TODO: FIX buffered-proxy.js to support arrays // TODO: FIX buffered-proxy.js to support arrays