Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/main/src/StepInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,13 @@ class StepInput extends UI5Element implements IFormInputElement {
}

get _isValueWithCorrectPrecision() {
// check if the value will be displayed with correct precision
// _displayValue has special formatting logic
if ((this.value === 0) || (Number.isInteger(this.value))) {
// integers and zero will be formatted with toFixed, so they're always valid
return true;
}

// gets either "." or "," as delimiter which is based on locale, and splits the number by it
const delimiter = this.input?.value?.includes(".") ? "." : ",";
const numberParts = this.input?.value?.split(delimiter);
Expand Down
Loading