Skip to content

Commit

Permalink
adding button wrapper for icon (gregnb#970)
Browse files Browse the repository at this point in the history
* adding button wrapper for icon

* changing button ot IconButton, disable button form HeaderCell
  • Loading branch information
michalica authored and lalong13 committed Jan 15, 2020
1 parent ad918ad commit b99ca0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/TableSelectCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import Checkbox from '@material-ui/core/Checkbox';
import TableCell from '@material-ui/core/TableCell';
import IconButton from '@material-ui/core/IconButton';
import { withStyles } from '@material-ui/core/styles';
import KeyboardArrowRight from '@material-ui/icons/KeyboardArrowRight';

Expand Down Expand Up @@ -107,7 +108,7 @@ class TableSelectCell extends React.Component {
return (
<TableCell className={cellClass} padding="checkbox">
<div style={{ display: 'flex', alignItems: 'center' }}>
{expandableOn && <KeyboardArrowRight id="expandable-button" className={iconClass} onClick={onExpand} />}
{expandableOn && <IconButton onClick={onExpand} disabled={isHeaderCell} ><KeyboardArrowRight id="expandable-button" className={iconClass} /></IconButton>}
{selectableOn !== 'none' && renderCheckBox()}
</div>
</TableCell>
Expand Down

0 comments on commit b99ca0f

Please sign in to comment.