question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[List] [Listitem] Theme not updating on muiTheme change

See original GitHub issue

Problem 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:closed
  • Created 7 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
mbrookescommented, May 28, 2016

@puranjayjain Thanks for the PR. Please open a new issue for dialogue.

1reaction
mbrookescommented, May 27, 2016

@puranjayjain Feel free to submit a PR.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found