0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-29 20:20:29 +01:00
discourse-custom-wizard/assets/javascripts/wizard/components/wizard-group-selector.js.es6
2020-03-24 20:35:46 +11:00

12 Zeilen
Kein EOL
425 B
JavaScript

import ComboBox from 'select-kit/components/combo-box';
import { computed } from "@ember/object";
import { makeArray } from "discourse-common/lib/helpers";
export default ComboBox.extend({
content: computed("groups.[]", "whitelist.[]", function() {
const whitelist = makeArray(this.whitelist);
return this.groups.filter(group => {
return !whitelist.length || whitelist.indexOf(group.id) > -1;
});
})
})