react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

step attribute should be set to any in antd form

Open Sebadst opened this issue 1 year ago • 1 comments

Prerequisites

What theme are you using?

antd

Version

5.13.2

Current Behavior

When dealing with numbers, a "step"="1" is added to the input type. However, I would have expected "step"="any" when nothing is specified. On @rjsf/mui I got a "step"="any", as expected.

For example, this field generates the explained issue:

"my_field":
    {
        "description": "My description",
        "title": "My title",
        "type": "number"
    }

Expected Behavior

"step"="any" should be generated if no additional info are provided to a number.

Environment

- OS: macOS Sonoma 14.2.1
- Node: 20.10.0
- npm: 10.2.3

Sebadst avatar Jan 04 '24 15:01 Sebadst

@Sebadst we're explicitly setting it to false with the last parameter here.

We can't remember why we made that change. If you can thoroughly test the change to make sure it doesn't break anything, we would be happy to review a PR

nickgros avatar Jan 05 '24 20:01 nickgros