Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-10 04:12:53 +01:00
20 Zeilen
537 B
JavaScript
20 Zeilen
537 B
JavaScript
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
|
|
|
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;
|
|
},
|
|
});
|