Rerendering MDL drawer menu makes drawer button disappear
问题 I'm integrating MDL into a React application. I've just tried to make a component out of a Fixed Header layout (http://www.getmdl.io/components/index.html#layout-section) and noticed that if I hardcode the layout in the html it works as expected. However if i generate that html at runtime with JS the hamburger icon is missing. What should I do to fix that problem? 回答1: When you add an element after dom is already loaded you'll need to 'upgrade' the element. To do so dom-wide, try this snippet