Skip to content

Commit

Permalink
FIX Allow reloading react forms based on changes to a prop (#1771)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored May 31, 2024
1 parent ca4d75b commit effbe4f
Show file tree
Hide file tree
Showing 3 changed files with 390 additions and 728 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion client/src/containers/FormBuilderLoader/FormBuilderLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class FormBuilderLoader extends Component {
}

componentDidUpdate(prevProps) {
if (this.props.schemaUrl !== prevProps.schemaUrl) {
if (this.props.schemaUrl !== prevProps.schemaUrl || this.props.refetchSchemaCriteria !== prevProps.refetchSchemaCriteria) {
this.fetch();
}
}
Expand Down Expand Up @@ -441,6 +441,7 @@ FormBuilderLoader.propTypes = Object.assign({}, basePropTypes, {
schemaUrl: PropTypes.string.isRequired,
schema: schemaPropType,
refetchSchemaOnMount: PropTypes.bool.isRequired,
refetchSchemaCriteria: PropTypes.string,
form: PropTypes.string,
submitting: PropTypes.bool,
onFetchingSchema: PropTypes.func,
Expand Down
Loading

0 comments on commit effbe4f

Please sign in to comment.