You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apply the following diff to the material-ui examples:
diff --git a/examples/browserify-gulp-example/src/app/components/main.jsx b/examples/browserify-gulp-example/src/app/components/main.jsx
index 394e990..3d3e2b8 100644
--- a/examples/browserify-gulp-example/src/app/components/main.jsx+++ b/examples/browserify-gulp-example/src/app/components/main.jsx@@ -4,9 +4,17 @@ let React = require('react');
let mui = require('material-ui');
let RaisedButton = mui.RaisedButton;
let Dialog = mui.Dialog;
+let List = mui.List;+let ListItem = mui.ListItem;
let ThemeManager = new mui.Styles.ThemeManager();
let Colors = mui.Styles.Colors;
+let ButtonWrapper = React.createClass({+ render() {+ return <RaisedButton label="Its Button" onTouchTap={()=>alert('Button pressed')}/>;+ }+})+
let Main = React.createClass({
childContextTypes: {
@@ -38,18 +46,21 @@ let Main = React.createClass({
return (
<div style={containerStyle}>
- <Dialog- title="Super Secret Password"- actions={standardActions}- ref="superSecretPasswordDialog">- 1-2-3-4-5- </Dialog>-
<h1>material-ui</h1>
<h2>example project</h2>
- <RaisedButton label="Super Secret Password" primary={true} onTouchTap={this._handleTouchTap} />-+ <List>+ <ListItem+ primaryText="A Working Item"+ rightIconButton={<RaisedButton label="Its Button" onTouchTap={()=>alert('Button pressed')}/>}+ onTouchTap={()=>alert('Item pressed')}+ />+ <ListItem+ primaryText="A Broken Item"+ rightIconButton={<ButtonWrapper/>}+ onTouchTap={()=>alert('Item pressed')}+ />+ />+ </List>
</div>
);
},
And you'll get the following rendering (in Mac Chrome 47):
Even on the "working" list item, the button isn't vertically centered in the item, but in the broken item, the button doesn't get the "move to the right" style at all", and clicks on the button activate the list item's onTouchTap also instead of being swallowed as the rightIconButton documentation says it should be.
The text was updated successfully, but these errors were encountered:
See #3959. This strange behavior still occurs when rightIconButton is set to certain components instead of an element (as was the case for @jyasskin). It looks like it does work for components in some instances though
mnajdova
pushed a commit
to mnajdova/material-ui
that referenced
this issue
Nov 10, 2020
Apply the following diff to the material-ui examples:
And you'll get the following rendering (in Mac Chrome 47):
Even on the "working" list item, the button isn't vertically centered in the item, but in the broken item, the button doesn't get the "move to the right" style at all", and clicks on the button activate the list item's
onTouchTap
also instead of being swallowed as therightIconButton
documentation says it should be.The text was updated successfully, but these errors were encountered: