0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-26 02:50:28 +01:00

REFACTOR: used new syntax for computed property

Dieser Commit ist enthalten in:
Faizaan Gagan 2021-01-16 17:27:38 +05:30
Ursprung 94456fd797
Commit b2cdc1c29e

Datei anzeigen

@ -1,4 +1,5 @@
import { dasherize } from "@ember/string";
import discourseComputed from "discourse-common/utils/decorators";
export default {
name: "custom-wizard-field",
@ -15,9 +16,10 @@ export default {
FieldComponent.reopen({
classNameBindings: ["field.id"],
textType: function() {
return ['text', 'textarea', 'composer'].includes(this.get('field.type'));
}.property("field.type"),
@discourseComputed("field.type")
textType(fieldType) {
return ['text', 'textarea', 'composer'].includes(fieldType);
},
cookedDescription: function () {
return cook(this.get("field.description"));