Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react-grid): group icon offset in Material UI #171

Merged
merged 3 commits into from
Jun 29, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const groupCellTemplate = props => <TableGroupCell {...props} />;
export const TableGroupRow = props => (
<TableGroupRowBase
groupCellTemplate={groupCellTemplate}
groupIndentColumnWidth={16}
groupIndentColumnWidth={22}
{...props}
/>
);
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ const styleSheet = createStyleSheet('TableGroupCell', theme => ({
indentCell: {
padding: 0,
},
groupIcon: {
verticalAlign: 'middle',
display: 'inline-block',
marginRight: '6px',
height: theme.spacing.unit * 3,
},
columnTitle: {
verticalAlign: 'middle',
},
}));

const TableGroupCellBase = ({
Expand All @@ -35,22 +44,14 @@ const TableGroupCellBase = ({
className={classes.cell}
onClick={toggleGroupExpanded}
>
<span
style={{
verticalAlign: 'middle',
display: 'inline-block',
marginRight: '6px',
marginLeft: '-6px',
height: '24px',
}}
>
<span className={classes.groupIcon}>
{
isExpanded
? <ExpandMore />
: <ChevronRight />
}
</span>
<strong style={{ verticalAlign: 'middle' }}>
<strong className={classes.columnTitle}>
{row.column.title || row.column.name}: {row.value}
</strong>
</TableCell>
Expand Down