react-jsonschema-form
react-jsonschema-form copied to clipboard
step attribute should be set to any in antd form
Prerequisites
- [X] I have searched the existing issues
- [X] I understand that providing a SSCCE example is tremendously useful to the maintainers.
- [X] I have read the documentation
- [X] Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
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 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