react-jsonschema-form
react-jsonschema-form copied to clipboard
`patternProperties` number keys make the input get rendered at the very top of the `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
- [ ] Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
core
Version
6.0.0-beta.8
Current Behavior
Adding a new patternProperties key that is a number makes the key name input get rendered at the very top of the Form:
Notice that keys that have non-numeric characters in them are not affected by this issue.
Expected Behavior
Keys should at least remain grouped. It would be intuitive to always have them rendered in the order they were added.
If they should be reordered dynamically amongst themselves, I don't know.
Maybe this could be a customizable behaviour set through a new prop or UiSchema property? Just like lists allow reordering, maybe?
Steps To Reproduce
- Go to the playground
patternPropertiesexample. - Change the regex of the JSON Schema
patternpropertiesproperty to"(.*?)", so it matches anything. - Add a new property with a purely numeric key.
- Observe where the field gets rendered.
Environment
Irrelevant
Anything else?
No response