Simplify code and blur input on enter

This commit is contained in:
stampyzfanz 2023-08-13 07:57:34 +10:00 committed by cyip92
parent 2e68609d4d
commit 722f9d6758

View File

@ -69,7 +69,7 @@ export default {
handleFocus() {
this.isFocused = true;
},
updateAutobuyerValue() {
handleChange(event) {
if (this.displayValue === "69") {
SecretAchievement(28).unlock();
}
@ -80,10 +80,9 @@ export default {
}
this.updateDisplayValue();
this.isValid = true;
},
handleBlur() {
this.updateActualValue();
this.isFocused = false;
event.target.blur();
},
}
};
@ -145,8 +144,7 @@ export const AutobuyerInputFunctions = {
:class="validityClass"
:type="inputType"
class="o-autobuyer-input"
@blur="handleBlur"
@change="updateAutobuyerValue"
@change="handleChange"
@focus="handleFocus"
@input="handleInput"
>