From 36bd0253601afd1f85e4a3ab125b262fa9e36056 Mon Sep 17 00:00:00 2001 From: Andy Edwards Date: Thu, 19 Sep 2019 11:43:57 -0500 Subject: [PATCH] fix(Table): allow cell overflow style to be overridden fix #1423 --- source/Table/Table.jest.js | 6 +++++- source/Table/Table.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/Table/Table.jest.js b/source/Table/Table.jest.js index 57dd5fda2..544759fdc 100644 --- a/source/Table/Table.jest.js +++ b/source/Table/Table.jest.js @@ -1099,7 +1099,7 @@ describe('Table', () => { }); it('should use custom :styles if specified', () => { - const columnStyle = {backgroundColor: 'red'}; + const columnStyle = {backgroundColor: 'red', overflow: 'visible'}; const headerStyle = {backgroundColor: 'blue'}; const columnHeaderStyle = {color: 'yellow'}; const rowStyle = {backgroundColor: 'green'}; @@ -1119,6 +1119,10 @@ describe('Table', () => { node.querySelector('.ReactVirtualized__Table__rowColumn').style .backgroundColor, ).toEqual('red'); + expect( + node.querySelector('.ReactVirtualized__Table__rowColumn').style + .overflow, + ).toEqual('visible'); expect( node.querySelector('.ReactVirtualized__Table__headerColumn').style .backgroundColor, diff --git a/source/Table/Table.js b/source/Table/Table.js index 088944f52..f0a0a1994 100644 --- a/source/Table/Table.js +++ b/source/Table/Table.js @@ -394,8 +394,8 @@ export default class Table extends React.PureComponent { ); this._cachedColumnStyles[index] = { - ...flexStyles, overflow: 'hidden', + ...flexStyles, }; });