Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit e856477

Browse files
Fix dropdown
1 parent 595c7d9 commit e856477

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/components/form/configUIForm.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,23 @@ export function ConfigUIForm({ prepareSubmitValues, container }: ConfigUIFormPro
187187
}
188188
}, [form?.formState?.errors, config?.debug]);
189189

190-
const theme = useMemo(() => createTheme(createThemeOptions()), []);
190+
const theme = useMemo(() => {
191+
const themeOptions = createThemeOptions();
192+
if (container) {
193+
themeOptions.components = {
194+
...themeOptions.components,
195+
MuiMenu: {
196+
...themeOptions.components?.MuiMenu,
197+
defaultProps: {
198+
...themeOptions.components?.MuiMenu?.defaultProps,
199+
container: container as any,
200+
},
201+
},
202+
};
203+
}
204+
205+
return createTheme(themeOptions);
206+
}, [container]);
191207

192208
return (
193209
<CacheProvider value={emotionCache}>

0 commit comments

Comments
 (0)