react-jsonschema-form
react-jsonschema-form copied to clipboard
Form component's focusOnFirstError throws an error with additionalProperties schema and dot idSchema
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?
core
Version
5.18.5
Current Behavior
Form component's focusOnFirstError throws an error with additionalProperties schema and dot idSchema e.g.
Failed to execute 'querySelector' on 'Element': 'input[id^=root.title' is not a valid selector.
Expected Behavior
Should not throw an error and scroll to the first invalid input.
Steps To Reproduce
- Go to https://wrqx2n.csb.app/
- Click on the plus icon to add a new item
- Click submit without adding a value
- Observe the error thrown
Failed to execute 'querySelector' on 'Element': 'input[id^=root.title' is not a valid selector.
Environment
- OS: macOS 14.5
- Node: 20.11.0
- npm: 10.2.4
Anything else?
No response