Skip to content

Commit

Permalink
DEV: Convert to native class syntax (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq authored Nov 29, 2024
1 parent 935e7ac commit 67d9b1c
Showing 1 changed file with 14 additions and 12 deletions.
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");
}
},
});
}
}

0 comments on commit 67d9b1c

Please sign in to comment.