Skip to content

Decimal steps are not working in the Number Input #1665

@GomezIvann

Description

@GomezIvann

Describe the bug
Setting a decimal step on the Number Input is not working as expected. Only the first click works decently, the followings keep the same value and doesn't update.

To Reproduce

  • Create a React App with the following code:
() => {
  const [value, setValue] = useState("");
  const onChange = ({ value }) => {
    setValue(value);
  };
  const onBlur = ({ value }) => {
    setValue(value);
  };

  return (
    <DxcInset space="2rem">
      <DxcNumberInput
        label="Enter your age"
        value={value}
        onChange={onChange}
        onBlur={onBlur}
        step={0.01}
      />
    </DxcInset>
  );
}

Expected behaviour
Update the value with the correct decimal step.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingjiraThis task is referenced in a story of Jira

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions