Commit c1e8beee authored by Viacheslav Pavlov's avatar Viacheslav Pavlov
Browse files

buttonBar fixed nested components handle

parent ffb6cce3
......@@ -23,9 +23,6 @@ const styles = (theme) => ({
barText: {
'& > *:first-child': {
display: 'block',
'@media (min-width: 940px) and (max-width: 1060px)': {
display: 'none',
},
[theme.breakpoints.down('xs')]: {
display: 'none',
},
......@@ -33,7 +30,7 @@ const styles = (theme) => ({
},
menuItem: {
padding: '6px 0',
'& > button': {
'& button': {
width: '100%',
height: '100%',
'& > span': {
......@@ -88,7 +85,7 @@ const styles = (theme) => ({
padding: '0',
'& button': {
boxShadow: 'none',
backgroundColor: 'transparent',
backgroundColor: 'transparent !important',
}
},
},
......@@ -133,7 +130,8 @@ class ButtonBar extends React.Component<IButtonBarProps, any> {
public render() {
const { classes, children, barLabelText } = this.props;
const { anchorEl } = this.state;
const childrenArr = React.Children.toArray(children);
const childrenArr = React.Children.toArray(children) as any;
return (
<div className={ classes.root }>
......@@ -160,7 +158,7 @@ class ButtonBar extends React.Component<IButtonBarProps, any> {
className={ classes.list }
>
{ childrenArr.map((button, index) => (
button && (
button && !(button.props && button.props.children === false) && (
<MenuItem
key={ index }
selected={ null }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment