Skip to content

Commit

Permalink
Merge pull request #617 from jbetancur/fix/615
Browse files Browse the repository at this point in the history
column.button should allow overflow
  • Loading branch information
jbetancur authored Jul 4, 2020
2 parents b9e6b88 + 326f5d0 commit d33ade6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-data-table-component",
"version": "6.9.3",
"version": "6.9.4",
"description": "A declarative react based data table",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand Down
12 changes: 7 additions & 5 deletions src/DataTable/TableCell.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import React, { memo } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import styled, { css } from 'styled-components';
import { Cell } from './Cell';
import { getProperty, getConditionalStyle } from './util';

const TableCellStyle = styled(Cell)`
font-size: ${props => props.theme.rows.fontSize};
font-weight: 400;
const overflowCSS = css`
div:first-child {
white-space: ${props => (props.column.wrap ? 'normal' : 'nowrap')};
overflow: ${props => (props.column.allowOverflow ? 'visible' : 'hidden')};
text-overflow: ellipsis;
}
`;

const TableCellStyle = styled(Cell)`
font-size: ${props => props.theme.rows.fontSize};
font-weight: 400;
${props => !props.column.button && overflowCSS};
${props => props.column.style};
${props => props.extendedCellStyle};
`;
Expand Down
6 changes: 0 additions & 6 deletions src/DataTable/__tests__/__snapshots__/DataTable.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -20426,12 +20426,6 @@ exports[`DataTable::columns should render correctly when column.button = true 1`
font-weight: 400;
}

.c15 div:first-child {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.c14 {
display: -webkit-box;
display: -webkit-flex;
Expand Down

0 comments on commit d33ade6

Please sign in to comment.