2018-03-22 06:29:55 -04:00
|
|
|
const { get, isNone, run, isEmpty, makeArray } = Ember;
|
2017-11-21 05:53:09 -05:00
|
|
|
import computed from "ember-addons/ember-computed-decorators";
|
|
|
|
import UtilsMixin from "select-kit/mixins/utils";
|
|
|
|
import DomHelpersMixin from "select-kit/mixins/dom-helpers";
|
|
|
|
import EventsMixin from "select-kit/mixins/events";
|
|
|
|
import PluginApiMixin from "select-kit/mixins/plugin-api";
|
2017-11-22 04:34:12 -05:00
|
|
|
import {
|
2018-01-09 04:52:32 -05:00
|
|
|
applyContentPluginApiCallbacks,
|
2018-01-11 03:39:51 -05:00
|
|
|
applyHeaderContentPluginApiCallbacks,
|
2018-01-26 08:42:24 -05:00
|
|
|
applyCollectionHeaderCallbacks
|
2017-11-22 04:34:12 -05:00
|
|
|
} from "select-kit/mixins/plugin-api";
|
2017-11-21 05:53:09 -05:00
|
|
|
|
|
|
|
export default Ember.Component.extend(UtilsMixin, PluginApiMixin, DomHelpersMixin, EventsMixin, {
|
|
|
|
pluginApiIdentifiers: ["select-kit"],
|
|
|
|
layoutName: "select-kit/templates/components/select-kit",
|
2018-02-05 12:25:39 -05:00
|
|
|
classNames: ["select-kit"],
|
2017-11-21 05:53:09 -05:00
|
|
|
classNameBindings: [
|
2018-02-13 11:23:12 -05:00
|
|
|
"isLoading",
|
2017-11-21 05:53:09 -05:00
|
|
|
"isFocused",
|
|
|
|
"isExpanded",
|
|
|
|
"isDisabled",
|
|
|
|
"isHidden",
|
|
|
|
"isAbove",
|
|
|
|
"isBelow",
|
|
|
|
"isLeftAligned",
|
2018-01-24 05:48:20 -05:00
|
|
|
"isRightAligned",
|
|
|
|
"hasSelection",
|
2018-04-05 10:45:19 -04:00
|
|
|
"hasReachedMaximum",
|
|
|
|
"hasReachedMinimum",
|
2017-11-21 05:53:09 -05:00
|
|
|
],
|
|
|
|
isDisabled: false,
|
|
|
|
isExpanded: false,
|
|
|
|
isFocused: false,
|
|
|
|
isHidden: false,
|
2018-02-13 11:23:12 -05:00
|
|
|
isLoading: false,
|
2018-02-26 05:42:57 -05:00
|
|
|
isAsync: false,
|
2017-11-21 05:53:09 -05:00
|
|
|
renderedBodyOnce: false,
|
|
|
|
renderedFilterOnce: false,
|
|
|
|
tabindex: 0,
|
|
|
|
none: null,
|
2018-03-22 06:29:55 -04:00
|
|
|
highlighted: null,
|
2017-11-21 05:53:09 -05:00
|
|
|
valueAttribute: "id",
|
|
|
|
nameProperty: "name",
|
|
|
|
autoFilterable: false,
|
|
|
|
filterable: false,
|
|
|
|
filter: "",
|
2018-03-22 06:29:55 -04:00
|
|
|
previousFilter: "",
|
2017-11-21 05:53:09 -05:00
|
|
|
filterPlaceholder: "select_kit.filter_placeholder",
|
|
|
|
filterIcon: "search",
|
|
|
|
headerIcon: null,
|
|
|
|
rowComponent: "select-kit/select-kit-row",
|
|
|
|
rowComponentOptions: null,
|
|
|
|
noneRowComponent: "select-kit/select-kit-none-row",
|
|
|
|
createRowComponent: "select-kit/select-kit-create-row",
|
|
|
|
filterComponent: "select-kit/select-kit-filter",
|
|
|
|
headerComponent: "select-kit/select-kit-header",
|
|
|
|
headerComponentOptions: null,
|
|
|
|
headerComputedContent: null,
|
2018-01-26 08:42:24 -05:00
|
|
|
collectionHeaderComputedContent: null,
|
2017-11-21 05:53:09 -05:00
|
|
|
collectionComponent: "select-kit/select-kit-collection",
|
|
|
|
verticalOffset: 0,
|
|
|
|
horizontalOffset: 0,
|
|
|
|
fullWidthOnMobile: false,
|
|
|
|
castInteger: false,
|
|
|
|
allowAny: false,
|
|
|
|
allowInitialValueMutation: false,
|
|
|
|
content: null,
|
|
|
|
computedContent: null,
|
2018-01-11 03:54:39 -05:00
|
|
|
limitMatches: null,
|
2017-11-22 07:49:45 -05:00
|
|
|
nameChanges: false,
|
2017-12-22 07:08:12 -05:00
|
|
|
allowContentReplacement: false,
|
2017-12-13 04:49:32 -05:00
|
|
|
collectionHeader: null,
|
2018-01-24 05:48:20 -05:00
|
|
|
allowAutoSelectFirst: true,
|
2018-03-22 06:29:55 -04:00
|
|
|
highlightedSelection: null,
|
2018-04-05 10:45:19 -04:00
|
|
|
maximum: null,
|
|
|
|
minimum: null,
|
|
|
|
minimumLabel: null,
|
|
|
|
maximumLabel: null,
|
2017-11-21 05:53:09 -05:00
|
|
|
|
|
|
|
init() {
|
|
|
|
this._super();
|
|
|
|
|
|
|
|
this.noneValue = "__none__";
|
|
|
|
this.set("headerComponentOptions", Ember.Object.create());
|
|
|
|
this.set("rowComponentOptions", Ember.Object.create());
|
|
|
|
this.set("computedContent", []);
|
2018-03-22 06:29:55 -04:00
|
|
|
this.set("highlightedSelection", []);
|
2017-11-21 05:53:09 -05:00
|
|
|
|
2017-11-26 11:21:39 -05:00
|
|
|
if (this.site && this.site.isMobileDevice) {
|
2018-03-04 07:47:25 -05:00
|
|
|
this.setProperties({
|
|
|
|
filterable: isNone(this.get("filterable")) ? false : this.get("filterable"),
|
|
|
|
autoFilterable: isNone(this.get("autoFilterable")) ? false : this.get("filterable")
|
|
|
|
});
|
2017-11-21 05:53:09 -05:00
|
|
|
}
|
2017-11-22 07:49:45 -05:00
|
|
|
|
|
|
|
if (this.get("nameChanges")) {
|
|
|
|
this.addObserver(`content.@each.${this.get("nameProperty")}`, this, this._compute);
|
|
|
|
}
|
2017-11-27 13:50:04 -05:00
|
|
|
|
2017-12-22 07:08:12 -05:00
|
|
|
if (this.get("allowContentReplacement")) {
|
2017-11-27 13:50:04 -05:00
|
|
|
this.addObserver(`content.[]`, this, this._compute);
|
|
|
|
}
|
2018-02-26 05:42:57 -05:00
|
|
|
|
|
|
|
if (this.get("isAsync")) {
|
|
|
|
this.addObserver(`asyncContent.[]`, this, this._compute);
|
|
|
|
}
|
2017-11-22 07:49:45 -05:00
|
|
|
},
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
keyDown(event) {
|
|
|
|
if (!isEmpty(this.get("filter"))) return true;
|
|
|
|
|
|
|
|
const keyCode = event.keyCode || event.which;
|
|
|
|
|
|
|
|
if (event.metaKey === true && keyCode === this.keys.A) {
|
|
|
|
this.didPressSelectAll();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (keyCode === this.keys.BACKSPACE) {
|
|
|
|
this.didPressBackspace();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2017-11-22 07:49:45 -05:00
|
|
|
willDestroyElement() {
|
|
|
|
this.removeObserver(`content.@each.${this.get("nameProperty")}`, this, this._compute);
|
2017-11-27 13:50:04 -05:00
|
|
|
this.removeObserver(`content.[]`, this, this._compute);
|
2018-02-26 05:42:57 -05:00
|
|
|
this.removeObserver(`asyncContent.[]`, this, this._compute);
|
2017-11-21 05:53:09 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
willComputeAttributes() {},
|
|
|
|
didComputeAttributes() {},
|
|
|
|
|
|
|
|
willComputeContent(content) { return content; },
|
|
|
|
computeContent(content) { return content; },
|
|
|
|
_beforeDidComputeContent(content) {
|
2017-11-22 04:34:12 -05:00
|
|
|
content = applyContentPluginApiCallbacks(this.get("pluginApiIdentifiers"), content, this);
|
2017-11-21 05:53:09 -05:00
|
|
|
|
|
|
|
const existingCreatedComputedContent = this.get("computedContent").filterBy("created", true);
|
|
|
|
this.setProperties({
|
|
|
|
computedContent: content.map(c => this.computeContentItem(c)).concat(existingCreatedComputedContent)
|
|
|
|
});
|
|
|
|
return content;
|
|
|
|
},
|
|
|
|
didComputeContent() {},
|
|
|
|
|
2018-02-26 05:42:57 -05:00
|
|
|
willComputeAsyncContent(content) { return content; },
|
|
|
|
computeAsyncContent(content) { return content; },
|
|
|
|
_beforeDidComputeAsyncContent(content) {
|
|
|
|
content = applyContentPluginApiCallbacks(this.get("pluginApiIdentifiers"), content, this);
|
|
|
|
this.setProperties({
|
|
|
|
computedAsyncContent: content.map(c => this.computeAsyncContentItem(c))
|
|
|
|
});
|
|
|
|
return content;
|
|
|
|
},
|
|
|
|
didComputeAsyncContent() {},
|
|
|
|
|
2017-11-21 05:53:09 -05:00
|
|
|
computeContentItem(contentItem, options) {
|
|
|
|
let originalContent;
|
|
|
|
options = options || {};
|
|
|
|
const name = options.name;
|
|
|
|
|
|
|
|
if (typeof contentItem === "string" || typeof contentItem === "number") {
|
|
|
|
originalContent = {};
|
|
|
|
originalContent[this.get("valueAttribute")] = contentItem;
|
|
|
|
originalContent[this.get("nameProperty")] = name || contentItem;
|
|
|
|
} else {
|
|
|
|
originalContent = contentItem;
|
|
|
|
}
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
let computedContentItem = {
|
2017-11-21 05:53:09 -05:00
|
|
|
value: this._castInteger(this.valueForContentItem(contentItem)),
|
|
|
|
name: name || this._nameForContent(contentItem),
|
|
|
|
locked: false,
|
|
|
|
created: options.created || false,
|
2018-03-22 06:29:55 -04:00
|
|
|
__sk_row_type: options.created ? "createRow" : null,
|
2017-11-21 05:53:09 -05:00
|
|
|
originalContent
|
|
|
|
};
|
2018-03-22 06:29:55 -04:00
|
|
|
|
|
|
|
return computedContentItem;
|
|
|
|
},
|
|
|
|
|
|
|
|
computeAsyncContentItem(contentItem, options) {
|
|
|
|
return this.computeContentItem(contentItem, options);
|
|
|
|
},
|
|
|
|
|
|
|
|
@computed("isAsync", "isLoading", "filteredAsyncComputedContent.[]", "filteredComputedContent.[]")
|
|
|
|
collectionComputedContent(isAsync, isLoading, filteredAsyncComputedContent, filteredComputedContent) {
|
|
|
|
if (isAsync) {
|
|
|
|
return isLoading ? [] : filteredAsyncComputedContent;
|
|
|
|
} else {
|
|
|
|
return filteredComputedContent;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-04-05 10:45:19 -04:00
|
|
|
validateCreate() { return !this.get("hasReachedMaximum"); },
|
2018-03-22 06:29:55 -04:00
|
|
|
|
2018-04-05 10:45:19 -04:00
|
|
|
validateSelect() { return !this.get("hasReachedMaximum"); },
|
2018-03-22 06:29:55 -04:00
|
|
|
|
2018-04-05 10:45:19 -04:00
|
|
|
@computed("maximum", "selection.[]")
|
|
|
|
hasReachedMaximum(maximum, selection) {
|
|
|
|
if (!maximum) return false;
|
|
|
|
selection = makeArray(selection);
|
|
|
|
return selection.length >= maximum;
|
|
|
|
},
|
|
|
|
|
|
|
|
@computed("minimum", "selection.[]")
|
|
|
|
hasReachedMinimum(minimum, selection) {
|
|
|
|
if (!minimum) return true;
|
|
|
|
selection = makeArray(selection);
|
|
|
|
return selection.length >= minimum;
|
2017-11-21 05:53:09 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
@computed("shouldFilter", "allowAny", "filter")
|
|
|
|
shouldDisplayFilter(shouldFilter, allowAny, filter) {
|
2018-01-11 03:39:51 -05:00
|
|
|
if (shouldFilter) return true;
|
|
|
|
if (allowAny && filter.length > 0) return true;
|
2017-11-21 05:53:09 -05:00
|
|
|
return false;
|
|
|
|
},
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
@computed("filter", "collectionComputedContent.[]", "isLoading")
|
|
|
|
noContentRow(filter, collectionComputedContent, isLoading) {
|
|
|
|
if (filter.length > 0 && collectionComputedContent.length === 0 && !isLoading) {
|
2018-02-13 18:30:09 -05:00
|
|
|
return I18n.t("select_kit.no_content");
|
|
|
|
}
|
2017-11-21 05:53:09 -05:00
|
|
|
},
|
|
|
|
|
2018-04-05 10:45:19 -04:00
|
|
|
@computed("hasReachedMaximum", "hasReachedMinimum", "isExpanded")
|
|
|
|
validationMessage(hasReachedMaximum, hasReachedMinimum) {
|
|
|
|
if (hasReachedMaximum && this.get("maximum")) {
|
|
|
|
const key = this.get("maximumLabel") || "select_kit.max_content_reached";
|
|
|
|
return I18n.t(key, { count: this.get("maximum") });
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!hasReachedMinimum && this.get("minimum")) {
|
|
|
|
const key = this.get("minimumLabel") || "select_kit.min_content_not_reached";
|
|
|
|
return I18n.t(key, { count: this.get("minimum") });
|
2018-02-26 05:42:57 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2017-11-21 05:53:09 -05:00
|
|
|
@computed("filter", "filterable", "autoFilterable", "renderedFilterOnce")
|
|
|
|
shouldFilter(filter, filterable, autoFilterable, renderedFilterOnce) {
|
2018-01-11 03:39:51 -05:00
|
|
|
if (renderedFilterOnce && filterable) return true;
|
|
|
|
if (filterable) return true;
|
|
|
|
if (autoFilterable && filter.length > 0) return true;
|
2017-11-21 05:53:09 -05:00
|
|
|
return false;
|
|
|
|
},
|
|
|
|
|
2018-04-05 10:45:19 -04:00
|
|
|
@computed("computedValue", "filter", "collectionComputedContent.[]", "hasReachedMaximum", "isLoading")
|
|
|
|
shouldDisplayCreateRow(computedValue, filter, collectionComputedContent, hasReachedMaximum, isLoading) {
|
|
|
|
if (isLoading || hasReachedMaximum) return false;
|
2018-03-03 05:42:44 -05:00
|
|
|
if (collectionComputedContent.map(c => c.value).includes(filter)) return false;
|
2018-02-13 11:23:12 -05:00
|
|
|
if (this.get("allowAny") && filter.length > 0 && this.validateCreate(filter)) return true;
|
2017-11-21 05:53:09 -05:00
|
|
|
return false;
|
|
|
|
},
|
|
|
|
|
|
|
|
@computed("filter", "shouldDisplayCreateRow")
|
|
|
|
createRowComputedContent(filter, shouldDisplayCreateRow) {
|
2018-01-11 03:39:51 -05:00
|
|
|
if (shouldDisplayCreateRow) {
|
2017-11-21 05:53:09 -05:00
|
|
|
let content = this.createContentFromInput(filter);
|
2018-03-22 06:29:55 -04:00
|
|
|
let computedContentItem = this.computeContentItem(content, { created: true });
|
|
|
|
computedContentItem.__sk_row_type = "createRow";
|
|
|
|
return computedContentItem;
|
2017-11-21 05:53:09 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
@computed
|
|
|
|
templateForRow() { return () => null; },
|
|
|
|
|
|
|
|
@computed
|
|
|
|
templateForNoneRow() { return () => null; },
|
|
|
|
|
|
|
|
@computed("filter")
|
|
|
|
templateForCreateRow() {
|
|
|
|
return (rowComponent) => {
|
2018-02-13 11:23:12 -05:00
|
|
|
return I18n.t("select_kit.create", {
|
2017-11-21 05:53:09 -05:00
|
|
|
content: rowComponent.get("computedContent.name")
|
|
|
|
});
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
@computed("none")
|
|
|
|
noneRowComputedContent(none) {
|
2018-03-29 07:42:00 -04:00
|
|
|
if (isNone(none)) return null;
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
let noneRowComputedContent;
|
2017-11-21 05:53:09 -05:00
|
|
|
|
|
|
|
switch (typeof none) {
|
|
|
|
case "string":
|
2018-03-22 06:29:55 -04:00
|
|
|
noneRowComputedContent = this.computeContentItem(this.noneValue, {
|
2018-01-04 14:08:21 -05:00
|
|
|
name: (I18n.t(none) || "").htmlSafe()
|
2017-12-05 19:09:12 -05:00
|
|
|
});
|
2018-03-22 06:29:55 -04:00
|
|
|
break;
|
2017-11-21 05:53:09 -05:00
|
|
|
default:
|
2018-03-22 06:29:55 -04:00
|
|
|
noneRowComputedContent = this.computeContentItem(none);
|
2017-11-21 05:53:09 -05:00
|
|
|
}
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
noneRowComputedContent.__sk_row_type = "noneRow";
|
2017-11-21 05:53:09 -05:00
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
return noneRowComputedContent;
|
2017-11-21 05:53:09 -05:00
|
|
|
},
|
2018-01-11 03:39:51 -05:00
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
createContentFromInput(input) { return input; },
|
2018-01-11 03:39:51 -05:00
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
highlightSelection(items) {
|
|
|
|
this.propertyWillChange("highlightedSelection");
|
|
|
|
this.set("highlightedSelection", makeArray(items));
|
|
|
|
this.propertyDidChange("highlightedSelection");
|
2017-11-21 05:53:09 -05:00
|
|
|
},
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
clearHighlightSelection() {
|
|
|
|
this.highlightSelection([]);
|
2017-11-21 05:53:09 -05:00
|
|
|
},
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
willSelect() {},
|
|
|
|
didSelect() {},
|
|
|
|
|
|
|
|
willCreate() {},
|
|
|
|
didCreate() {},
|
|
|
|
|
|
|
|
willDeselect() {},
|
|
|
|
didDeselect() {},
|
|
|
|
|
2017-11-21 05:53:09 -05:00
|
|
|
clearFilter() {
|
|
|
|
this.$filterInput().val("");
|
2018-03-22 06:29:55 -04:00
|
|
|
this.setProperties({ filter: "", previousFilter: "" });
|
2017-11-21 05:53:09 -05:00
|
|
|
},
|
|
|
|
|
2018-02-13 11:23:12 -05:00
|
|
|
startLoading() {
|
|
|
|
this.set("isLoading", true);
|
2018-03-22 06:29:55 -04:00
|
|
|
this.set("highlighted", null);
|
2018-02-13 11:23:12 -05:00
|
|
|
this._boundaryActionHandler("onStartLoading");
|
|
|
|
},
|
|
|
|
|
|
|
|
stopLoading() {
|
2018-03-22 06:29:55 -04:00
|
|
|
this.focus();
|
2018-02-13 11:23:12 -05:00
|
|
|
this.set("isLoading", false);
|
|
|
|
this._boundaryActionHandler("onStopLoading");
|
|
|
|
},
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
@computed("selection.[]", "isExpanded", "filter", "highlightedSelection.[]")
|
|
|
|
collectionHeaderComputedContent() {
|
|
|
|
return applyCollectionHeaderCallbacks(
|
2018-01-26 08:42:24 -05:00
|
|
|
this.get("pluginApiIdentifiers"),
|
|
|
|
this.get("collectionHeader"),
|
|
|
|
this
|
|
|
|
);
|
|
|
|
},
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
@computed("selection.[]", "isExpanded", "headerIcon")
|
|
|
|
headerComputedContent() {
|
|
|
|
return applyHeaderContentPluginApiCallbacks(
|
2018-01-09 04:52:32 -05:00
|
|
|
this.get("pluginApiIdentifiers"),
|
|
|
|
this.computeHeaderContent(),
|
|
|
|
this
|
|
|
|
);
|
|
|
|
},
|
|
|
|
|
2018-01-11 03:39:51 -05:00
|
|
|
_boundaryActionHandler(actionName, ...params) {
|
2018-03-22 06:29:55 -04:00
|
|
|
if (get(this.actions, actionName)) {
|
2018-01-15 05:55:16 -05:00
|
|
|
run.next(() => this.send(actionName, ...params));
|
2018-01-11 03:39:51 -05:00
|
|
|
} else if (this.get(actionName)) {
|
2018-01-15 05:55:16 -05:00
|
|
|
run.next(() => this.get(actionName)());
|
2018-01-11 03:39:51 -05:00
|
|
|
}
|
|
|
|
},
|
2018-01-09 04:52:32 -05:00
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
highlight(computedContent) {
|
|
|
|
this.set("highlighted", computedContent);
|
|
|
|
this._boundaryActionHandler("onHighlight", computedContent);
|
|
|
|
},
|
|
|
|
|
|
|
|
clearSelection() {
|
|
|
|
this.deselect(this.get("selection"));
|
|
|
|
this.focus();
|
|
|
|
},
|
|
|
|
|
2018-01-11 03:39:51 -05:00
|
|
|
actions: {
|
2018-03-22 06:29:55 -04:00
|
|
|
onToggle() {
|
|
|
|
this.clearHighlightSelection();
|
2018-01-11 03:39:51 -05:00
|
|
|
|
|
|
|
if (this.get("isExpanded")) {
|
|
|
|
this.collapse();
|
|
|
|
} else {
|
|
|
|
this.expand();
|
|
|
|
}
|
2017-11-21 05:53:09 -05:00
|
|
|
},
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
onClickRow(computedContentItem) {
|
|
|
|
this.didClickRow(computedContentItem);
|
2017-11-21 05:53:09 -05:00
|
|
|
},
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
onClickSelectionItem(computedContentItem) {
|
|
|
|
this.didClickSelectionItem(computedContentItem);
|
|
|
|
},
|
|
|
|
|
|
|
|
onClearSelection() {
|
|
|
|
this.clearSelection();
|
|
|
|
},
|
|
|
|
|
|
|
|
onMouseoverRow(computedContentItem) {
|
|
|
|
this.highlight(computedContentItem);
|
|
|
|
},
|
|
|
|
|
|
|
|
onFilterComputedContent(filter) {
|
2018-02-13 11:23:12 -05:00
|
|
|
if (filter === this.get("previousFilter")) return;
|
|
|
|
|
2018-03-22 06:29:55 -04:00
|
|
|
this.clearHighlightSelection();
|
|
|
|
|
2017-11-21 05:53:09 -05:00
|
|
|
this.setProperties({
|
2018-03-22 06:29:55 -04:00
|
|
|
highlighted: null,
|
2017-11-21 05:53:09 -05:00
|
|
|
renderedFilterOnce: true,
|
2018-02-13 11:23:12 -05:00
|
|
|
previousFilter: filter,
|
2017-11-21 05:53:09 -05:00
|
|
|
filter
|
|
|
|
});
|
|
|
|
this.autoHighlight();
|
2018-01-11 03:39:51 -05:00
|
|
|
this._boundaryActionHandler("onFilter", filter);
|
2017-11-21 05:53:09 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|