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

sap.m.StepInput does not handle more than 1 decimal places correctly #1228

Closed
krzysztofkuczek opened this issue Nov 15, 2016 · 5 comments
Closed

Comments

@krzysztofkuczek
Copy link

OpenUI5 version:1.40.10

Browser/version (+device/version):Electron/Chrome

Any other tested browsers/devices(OK/FAIL):N/A

URL (minimal example if possible):

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. Define xml view based app
  2. Define step input control with value and step having more then one decimal place: StepInput value="431.15" min="410.00" max="440.00" step="0.05" enabled="true" editable="true" width="165px"
  3. Run application, and press + or - button on step input control
  4. Step input value will be truncated to single decimal places, and there will be no way to increase/decrease value according to set max min values. So we will see
  • 431.15 - as initial value
  • 431.2 - after + button click
  • 431.3 - after next + button click
  • 431.4 - after next + button click
  • 431.4 - after next + button click <-- this is max value we can reach ! Please note that max is defined as 440.

What is the expected result?
Value should be displayed with more then 1 decimal places, and should be increased according to defined step. Max/Min Value should be check correctly.

What happens instead?
Please take a look above.

Any other information? (attach screenshot if possible)
stepinputproblem

Best regards
Krzysiek

@matz3 matz3 changed the title sap.m.StepInput does not handle more then 1 decimal places correctly sap.m.StepInput does not handle more than 1 decimal places correctly Nov 16, 2016
@matz3
Copy link
Member

matz3 commented Nov 16, 2016

Hey @krzysztofkuczek
Thanks for reporting this issue.
Do you mind to provide some small example where the described behavior can be reproduced?
This would really help us processing this issue faster. Feel free to use sites like https://jsbin.com to share your sample.

@matz3 matz3 self-assigned this Nov 16, 2016
@krzysztofkuczek
Copy link
Author

Please take a look
https://jsbin.com/pilicaxiqo/edit?html,output

@matz3
Copy link
Member

matz3 commented Nov 17, 2016

Thanks! Indeed, looks like a bug. Internal reference: 1680258112

@matz3 matz3 removed their assignment Nov 17, 2016
@DMihaylova
Copy link
Contributor

Hi @krzysztofkuczek,

Thank you for your issue!
Until we fix it please use only one digit after the decimal point because that's how it was restricted on the first place but there's no documentation explicitly saying it, sorry for that.
We will continue working on it and will respond to you when it's ready.

Kind Regards,
Diana, SAPUI5 control developer

@gerym
Copy link
Contributor

gerym commented Feb 3, 2017

Hi @krzysztofkuczek,

We have introduced new property of the stepInput control, which is called displayValuePrecision, and can work with up to 20 digits after the decimal point. This property will be available in 1.48 version of OpenUI5.

Kind Regards,
Gery (SAPUI5 Control developer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants