Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Convert to native class syntax #611

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions assets/javascripts/discourse/components/assign-actions-dropdown.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { action } from "@ember/object";
import { classNames } from "@ember-decorators/component";
import I18n from "I18n";
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
import { selectKitOptions } from "select-kit/components/select-kit";

export default DropdownSelectBoxComponent.extend({
classNames: ["assign-actions-dropdown"],
headerIcon: null,
allowInitialValueMutation: false,
@selectKitOptions({
icon: null,
translatedNone: "...",
showFullTitle: true,
selectKitOptions: {
icon: null,
translatedNone: "...",
showFullTitle: true,
},
})
@classNames("assign-actions-dropdown")
export default class AssignActionsDropdown extends DropdownSelectBoxComponent {
headerIcon = null;
allowInitialValueMutation = false;
showFullTitle = true;

computeContent() {
let options = [];
Expand Down Expand Up @@ -49,7 +51,7 @@ export default DropdownSelectBoxComponent.extend({
});
}
return options;
},
}

@action
onChange(id) {
Expand All @@ -65,5 +67,5 @@ export default DropdownSelectBoxComponent.extend({
if (postId) {
this.unassign(postId, "Post");
}
},
});
}
}