question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Decimals in InputValue (step property)

See original GitHub issue

Hello,

I am using the InputValue Component and using its property step. The documentation says:

Decimals: A numeric-only input box whose values can be increased or decreased using a decimal step. The number of decimals (also known as precision) is determined by the step prop.

In the example of the web we found:

ReactDOM.render(
  <InputNumber min={0} max={10} step={0.1} onChange={onChange} />
, mountNode);

But, you can inform 9.21 for instance. In my humble opinion, this wouldn’t be allowed and the value must change to 9.2. What do you think about that?

Best regards, Aaron Planell

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
benjycuicommented, May 5, 2017

Sorry, we are not native speakers. So the documentation maybe a little confusing…

0reactions
lock[bot]commented, May 5, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Number Input - Step Attribute - format value to 2 decimal places
Show activity on this post. You can use HTML5's step attribute to increment by the particular decimal. Save this answer. Show activity on...
Read more >
Transformer Seems to Ignore a Measure's Decimal Values - IBM
To include the decimal portion of an input value, you must scale the source values. You can do this by specifying an Input...
Read more >
sap.m.StepInput does not handle more than 1 decimal places ...
Step input value will be truncated to single decimal places, and there will be no way to increase/decrease value according to set max...
Read more >
HTML input step Attribute - W3Schools
The step attribute specifies the interval between legal numbers in an <input> element. Example: if step="3" , legal numbers could be -3, 0,...
Read more >
<input type="range"> - HTML: HyperText Markup Language
The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any , which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found