Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-step-input): remove value rounding, apply value-state #8293

Merged
merged 14 commits into from
May 9, 2024

Conversation

hinzzx
Copy link
Contributor

@hinzzx hinzzx commented Feb 16, 2024

Our <ui5-step-input> component used to round off the numbers based on the valuePrecision property. However this wasn't always the desired behavior.

For that reason we decided to give the application developers more control over the component and removed the rounding of the value if valuePrecision property is provided. To inform users about the correctness of their input based on the valuePrecision property, we now set a valueState on the component. This shows whether the input value meets the required precision.

Note: The valueState changing could be easily prevented by preventing the value-state-change event.
For refference Check this PR

Closes: #8086

@hinzzx hinzzx marked this pull request as ready for review February 16, 2024 14:14
packages/main/src/StepInput.ts Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Show resolved Hide resolved
Copy link
Contributor

@tsanislavgatev tsanislavgatev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we should ask test.

packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Show resolved Hide resolved
Copy link
Contributor

@unazko unazko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We would only need Tsani's approval regarding the _initialRender property.

packages/main/src/StepInput.ts Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
packages/main/src/StepInput.ts Show resolved Hide resolved
packages/main/src/StepInput.ts Outdated Show resolved Hide resolved
@hinzzx hinzzx requested a review from nnaydenow April 15, 2024 12:45
@hinzzx hinzzx merged commit 0c0aa1d into main May 9, 2024
9 checks passed
@hinzzx hinzzx deleted the step-input-precision branch May 9, 2024 11:59
ilhan007 pushed a commit that referenced this pull request May 13, 2024
Remove value rounding, apply value-state

Fixes: #8293
@niyap niyap mentioned this pull request Jun 5, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SF][StepInput]: when entering a decimal for 2 times, the decimal is not converted to an integer
5 participants