mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 02:06:29 +08:00
35 lines
832 B
JavaScript
35 lines
832 B
JavaScript
import ComboBoxComponent from "select-kit/components/combo-box";
|
|
|
|
export default ComboBoxComponent.extend({
|
|
pluginApiIdentifiers: ["topic-footer-mobile-dropdown"],
|
|
classNames: "topic-footer-mobile-dropdown",
|
|
filterable: false,
|
|
autoFilterable: false,
|
|
allowInitialValueMutation: false,
|
|
allowAutoSelectFirst: false,
|
|
nameProperty: "label",
|
|
|
|
computeHeaderContent() {
|
|
const content = this._super(...arguments);
|
|
|
|
content.name = I18n.t("topic.controls");
|
|
return content;
|
|
},
|
|
|
|
mutateAttributes() {},
|
|
|
|
willComputeContent(content) {
|
|
content = this._super(content);
|
|
|
|
// TODO: this is for backward compat reasons, should be removed
|
|
// when plugins have been updated for long enough
|
|
content.forEach(c => {
|
|
if (c.name) {
|
|
c.label = c.name;
|
|
}
|
|
});
|
|
|
|
return content;
|
|
}
|
|
});
|