1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/wizard/components/wizard-category-selector.js.es6
Faizaan Gagan 8d2dbd565e
FIX: increase width to accomodate long category names (#178)
* FIX: increase width to accomodate long category names

* version bump
2022-01-31 16:21:23 +05:30

18 Zeilen
580 B
JavaScript

import CategorySelector from "select-kit/components/category-selector";
import { computed } from "@ember/object";
import { makeArray } from "discourse-common/lib/helpers";
export default CategorySelector.extend({
classNames: ["category-selector", "wizard-category-selector"],
content: computed(
"categories.[]",
"blacklist.[]",
"whitelist.[]",
function () {
return this._super().filter((category) => {
const whitelist = makeArray(this.whitelist);
return !whitelist.length || whitelist.indexOf(category.id) > -1;
});
}
),
});