Skip to content

Commit

Permalink
Merge pull request #21783 from solimant/20055
Browse files Browse the repository at this point in the history
Use new option from RJSF 5.15
  • Loading branch information
benjdlambert committed Dec 8, 2023
2 parents 782bbb1 + c8908d4 commit 7211803
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/tiny-coins-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@backstage/plugin-scaffolder-react': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-home': patch
---

Use new option from RJSF 5.15
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ export const WidgetSettingsOverlay = (props: WidgetSettingsOverlayProps) => {
setSettingsDialogOpen(false);
}
}}
experimental_defaultFormStateBehavior={{
allOf: 'populateDefaults',
}}
/>
</DialogContent>
</Dialog>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ export const Stepper = (stepperProps: StepperProps) => {
fields={fields}
showErrorList={false}
onChange={handleChange}
experimental_defaultFormStateBehavior={{
allOf: 'populateDefaults',
}}
{...(props.formProps ?? {})}
>
<div className={styles.footer}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ export const MultistepJsonForm = (props: MultistepJsonFormProps) => {
onSubmit={(e: IChangeEvent<any>) => {
if (e.errors.length === 0) handleNext();
}}
experimental_defaultFormStateBehavior={{
allOf: 'populateDefaults',
}}
{...formProps}
{...transformSchemaToProps(schema, layouts)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ export const CustomFieldExplorer = ({
onSubmit={e => handleFieldConfigChange(e.formData)}
validator={validator}
schema={selectedField.schema?.uiOptions || {}}
experimental_defaultFormStateBehavior={{
allOf: 'populateDefaults',
}}
>
<Button
variant="contained"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ export const CustomFieldExplorer = ({
onSubmit={e => handleFieldConfigChange(e.formData)}
validator={validator}
schema={selectedField.schema?.uiOptions || {}}
experimental_defaultFormStateBehavior={{
allOf: 'populateDefaults',
}}
>
<Button
variant="contained"
Expand Down

0 comments on commit 7211803

Please sign in to comment.