[List] [Listitem] Theme not updating on muiTheme change
See original GitHub issueProblem description
- The mui theme is passed using context to down the tree.
- It is controlled by a state in the main parent.
- When the state is changed to switch to light theme to dark (or vice-versa). It is not changed for the listitem. Every other component’s theme is updated, including subheaders.
Steps to reproduce
- Change state controlling the theme
- Theme changed for all components except
<ListItem />
Note: I also tried forceUpdate to update it but it doesn’t update to the new state
Versions
- Material-UI: 15.0.1
- React: 15.1.0
- Browser: Chrome 50.0.2661.102
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
[List] [Listitem] Theme not updating on muiTheme change #4362
Problem description The mui theme is passed using context to down the tree. It is controlled by a state in the main parent....
Read more >Changing material-ui theme on the fly --> Doesn't affect children
If I repeatedly change my theme (using a select-list that sends out a redux-action onChange) the children are updated.
Read more >Breaking changes in v5, part one: styles and themes - MUI
The following document lists all breaking changes related to styles and themes in v5 and how to address them. After you're finished here,...
Read more >Global Styling with Material-UI Theme Overrides and Props
Learn how to use global CSS overrides and default props in a theme to customize all instances of a Material-UI component in a...
Read more >How to use styled components with Material UI in a React app
And I am not alone: with more than 42k stars on github, it is the most ... styled with MUI theme only );...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@puranjayjain Thanks for the PR. Please open a new issue for dialogue.
@puranjayjain Feel free to submit a PR.