Skip to content

Commit

Permalink
Validator should not refresh on clicking a Selector in playground (rj…
Browse files Browse the repository at this point in the history
…sf-team#4472)

* Validator should not refresh on clicking a Selector in playground

* Updated change log

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
  • Loading branch information
deepeshmi26 and heath-freenome authored Jan 31, 2025
1 parent b121756 commit 615a98c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ it according to semantic versioning. For example, if your PR adds a breaking cha
should change the heading of the (upcoming) version to include a major version bump.
-->
# 5.24.3

## Dev / docs / playground
- Fixed issue with selector, where validator was getting refreshed on clicking on anything in selector. [#4472](https://github.com/rjsf-team/react-jsonschema-form/pull/4472)

# 5.24.2

## @rjsf/utils
Expand Down
4 changes: 3 additions & 1 deletion packages/playground/src/components/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ export default function Playground({ themes, validators }: PlaygroundProps) {
setTheme(theTheme);
setShowForm(true);
setLiveSettings(liveSettings);
setValidator(validator);
if ('validator' in data) {
setValidator(validator);
}
setOtherFormProps({ fields, templates, ...rest });
},
[theme, onThemeSelected, themes]
Expand Down

0 comments on commit 615a98c

Please sign in to comment.