2021-09-03 10:46:32 +02:00
|
|
|
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
2021-10-14 14:41:24 +02:00
|
|
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
2021-09-03 10:46:32 +02:00
|
|
|
|
2021-10-14 14:41:24 +02:00
|
|
|
export default SelectKitRowComponent.extend({
|
|
|
|
classNameBindings: ["isDisabled:disabled"],
|
|
|
|
|
|
|
|
@discourseComputed("item")
|
|
|
|
isDisabled() {
|
|
|
|
return this.item.disabled;
|
|
|
|
},
|
|
|
|
|
|
|
|
click(event) {
|
|
|
|
event.preventDefault();
|
|
|
|
event.stopPropagation();
|
|
|
|
if (!this.item.disabled) {
|
|
|
|
this.selectKit.select(this.rowValue, this.item);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|