FIX: Reset tags on category change (#6363)

This commit is contained in:
Joffrey JAFFEUX
2018-09-05 17:18:52 +02:00
committed by GitHub
parent f3aef2cc83
commit 17087eff2a
8 changed files with 117 additions and 4 deletions

View File

@ -5,7 +5,10 @@ import {
} from "ember-addons/ember-computed-decorators";
const { get, isNone, isEmpty, isPresent, run, makeArray } = Ember;
import { applyOnSelectPluginApiCallbacks } from "select-kit/mixins/plugin-api";
import {
applyOnSelectPluginApiCallbacks,
applyOnSelectNonePluginApiCallbacks
} from "select-kit/mixins/plugin-api";
export default SelectKitComponent.extend({
pluginApiIdentifiers: ["single-select"],
@ -211,6 +214,11 @@ export default SelectKitComponent.extend({
!computedContentItem ||
computedContentItem.__sk_row_type === "noneRow"
) {
applyOnSelectNonePluginApiCallbacks(
this.get("pluginApiIdentifiers"),
this
);
this._boundaryActionHandler("onSelectNone");
this.clearSelection();
return;
}