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

fix querySelector in Form focusOnError when id includes dots

Open jroebu14 opened this issue 6 months ago • 0 comments

Reasons for making this change

Fixes https://github.com/rjsf-team/react-jsonschema-form/issues/4279

Fixes Form component focusOnFirstError throwing 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.

Fixes by adding double quotes around id in query selector.

Checklist

  • [ ] I'm updating documentation
  • [ ] I'm adding or updating code
    • [ ] I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • [ ] I've updated docs if needed
    • [ ] I've updated the changelog with a description of the PR
  • [ ] I'm adding a new feature
    • [ ] I've updated the playground with an example use of the feature

jroebu14 avatar Aug 20 '24 13:08 jroebu14