mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Don't use attrs (#24323)
This commit is contained in:
@@ -116,11 +116,11 @@ export default class AceEditor extends Component {
|
||||
this._skipContentChangeEvent = true;
|
||||
this.set("content", editor.getSession().getValue());
|
||||
});
|
||||
if (this.attrs.save) {
|
||||
if (this.save) {
|
||||
editor.commands.addCommand({
|
||||
name: "save",
|
||||
exec: () => {
|
||||
this.attrs.save();
|
||||
this.save();
|
||||
},
|
||||
bindKey: { mac: "cmd-s", win: "ctrl-s" },
|
||||
});
|
||||
|
||||
@@ -220,11 +220,11 @@ export default class AdminReport extends Component {
|
||||
|
||||
@action
|
||||
refreshReport(options = {}) {
|
||||
if (!this.attrs.onRefresh) {
|
||||
if (!this.onRefresh) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.attrs.onRefresh({
|
||||
this.onRefresh({
|
||||
type: this.get("model.type"),
|
||||
mode: this.currentMode,
|
||||
chartGrouping: options.chartGrouping,
|
||||
|
||||
@@ -45,8 +45,8 @@ export default class ColorInput extends Component {
|
||||
|
||||
@action
|
||||
onHexInput(event) {
|
||||
if (this.attrs.onChangeColor) {
|
||||
this.attrs.onChangeColor(this.normalize(event.target.value || ""));
|
||||
if (this.onChangeColor) {
|
||||
this.onChangeColor(this.normalize(event.target.value || ""));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ export default class ColorInput extends Component {
|
||||
hexValueChanged() {
|
||||
const hex = this.hexValue;
|
||||
|
||||
if (this.attrs.onChangeColor) {
|
||||
this.attrs.onChangeColor(this.normalize(hex));
|
||||
if (this.onChangeColor) {
|
||||
this.onChangeColor(this.normalize(hex));
|
||||
}
|
||||
|
||||
if (this._valid()) {
|
||||
|
||||
Reference in New Issue
Block a user