Skip to content

Commit 46f54f8

Browse files
tsanislavgatevilhan007
authored andcommitted
fix(ui5-step-input): firing step input once when value is deleted (#3474)
Fixes: #3457
1 parent 86214d5 commit 46f54f8

File tree

2 files changed

+475
-451
lines changed

2 files changed

+475
-451
lines changed

packages/main/src/StepInput.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,10 @@ class StepInput extends UI5Element {
492492
}
493493

494494
_fireChangeEvent() {
495-
this._previousValue = this.value;
496-
this.fireEvent("change", { value: this.value });
495+
if (this._previousValue !== this.value) {
496+
this._previousValue = this.value;
497+
this.fireEvent("change", { value: this.value });
498+
}
497499
}
498500

499501
/**
@@ -543,6 +545,9 @@ class StepInput extends UI5Element {
543545
}
544546

545547
_onInputChange(event) {
548+
if (this.input.value === "") {
549+
this.input.value = this.min || 0;
550+
}
546551
const inputValue = this._preciseValue(parseFloat(this.input.value));
547552
if (this.value !== this._previousValue || this.value !== inputValue) {
548553
this.value = inputValue;

0 commit comments

Comments
 (0)