Skip to content

Commit

Permalink
fix querySelector in Form focusOnError when id includes dots (rjsf-te…
Browse files Browse the repository at this point in the history
…am#4280)

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
  • Loading branch information
jroebu14 and heath-freenome authored Sep 10, 2024
1 parent 514ea85 commit 018621e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ export default class Form<
let field = this.formElement.current.elements[elementId];
if (!field) {
// if not an exact match, try finding an input starting with the element id (like radio buttons or checkboxes)
field = this.formElement.current.querySelector(`input[id^=${elementId}`);
field = this.formElement.current.querySelector(`input[id^="${elementId}"`);
}
if (field && field.length) {
// If we got a list with length > 0
Expand Down

0 comments on commit 018621e

Please sign in to comment.