react-virtualized
Advanced tools
Comparing version 4.7.0 to 4.7.1
Changelog | ||
------------ | ||
#### 4.7.1 | ||
Fixed `AutoSizer` bug that caused it to prevent parent flex containers from shrinking in some contexts. | ||
#### 4.7.0 | ||
@@ -5,0 +8,0 @@ Added `scrollToIndex` property to `FlexTable` to be passed through to inner `Grid`. |
@@ -6,3 +6,3 @@ { | ||
"user": "bvaughn", | ||
"version": "4.7.0", | ||
"version": "4.7.1", | ||
"scripts": { | ||
@@ -9,0 +9,0 @@ "build": "npm run build:css && npm run build:dist && npm run build:demo", |
@@ -67,2 +67,18 @@ /** @flow */ | ||
// Outer div should not force width/height since that may prevent containers from shrinking. | ||
// Inner div overflows and enforces calculated width/height. | ||
// See issue #68 for more information. | ||
const outerStyle = { overflow: 'visible' } | ||
const innerStyle = {} | ||
if (!disableWidth) { | ||
outerStyle.width = 0 | ||
innerStyle.width = width | ||
} | ||
if (!disableHeight) { | ||
outerStyle.height = 0 | ||
innerStyle.height = height | ||
} | ||
return ( | ||
@@ -72,8 +88,9 @@ <div | ||
className={cn('AutoSizer', className)} | ||
style={{ | ||
width: '100%', | ||
height: '100%' | ||
}} | ||
style={outerStyle} | ||
> | ||
{child} | ||
<div | ||
style={innerStyle} | ||
> | ||
{child} | ||
</div> | ||
</div> | ||
@@ -80,0 +97,0 @@ ) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
669175
8296