Skip to content

Commit cb8d8e4

Browse files
- Fixed the load of shared links to convert material-ui-5 to mui
1 parent 7b867a7 commit cb8d8e4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/playground/src/components/Playground.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,17 @@ export default function Playground({ themes, validators }: PlaygroundProps) {
7272
...rest
7373
} = data;
7474

75-
onThemeSelected(dataTheme, themes[dataTheme]);
75+
// To support mui v6 `material-ui-5` was change to `mui` fix the load to update that as well
76+
const theTheme = dataTheme === 'material-ui-5' ? 'mui' : dataTheme;
77+
onThemeSelected(theTheme, themes[theTheme]);
7678

7779
// force resetting form component instance
7880
setShowForm(false);
7981
setSchema(schema);
8082
setUiSchema(uiSchema);
8183
setFormData(formData);
8284
setExtraErrors(extraErrors);
83-
setTheme(dataTheme);
85+
setTheme(theTheme);
8486
setShowForm(true);
8587
setLiveSettings(liveSettings);
8688
setOtherFormProps({ fields, templates, ...rest });

0 commit comments

Comments
 (0)