Custom theme not working after adding custom appLayout
What you were expecting: My custom theme applying to the layout as described in the documentation
What happened instead: The custom theme is not working. (Just setting its default) after adding appLayout. When applying MuiLayoutProvider manually in my appLayout (By wrapping the outer
Steps to reproduce:
Create a custom layout and add it on the Admin component.
Like <Admin
theme={theme}
dashboard={Dashboard}
dataProvider={dataProvider}
title=""
appLayout={Layout}
Used the code described on this page for the appLayout: https://marmelab.com/react-admin/Theming.html#using-a-custom-layout And for a custom theme: https://marmelab.com/react-admin/Theming.html#writing-a-custom-theme
React-admin version: 2.1.2 Last version that did not exhibit the issue (if applicable): - React version: 16.4.1 Browser: Chrome 67.0.3 Stack trace (in case of a JS error): -
How did you customize the Layout ? Did you extend the default one or created your own ?
Did the last one, so I guess creating a own one and not extending: https://marmelab.com/react-admin/Theming.html#using-a-custom-layout. Should I extend one?
Depends on what you want to change. If you only want to override the appBar, the menu, or the notification component, just extend the default one.
If you want more, you'll have to implement your own and include the MuiThemeProvider by yourself like we do in the default layout here