@avinlab/react-size-me
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -15,1 +15,4 @@ Changelog | ||
Calculate size on mount | ||
# 1.1.3 | ||
Set container overflow hidden |
@@ -46,2 +46,3 @@ 'use strict'; | ||
this._parentNode = this._root.parentNode; | ||
this._parentNode.style.overflow = 'hidden'; | ||
this._elementResizeDetector = elementResizeDetectorMaker({ | ||
@@ -95,4 +96,9 @@ strategy: 'scroll' | ||
className = _this$props2.className; | ||
return React.createElement("span", _extends({ | ||
style: style, | ||
var containerStyle = { | ||
width: 0, | ||
height: 0, | ||
overflow: 'visible' | ||
}; | ||
return React.createElement("div", _extends({ | ||
style: _extends({}, containerStyle, style), | ||
className: className | ||
@@ -99,0 +105,0 @@ }, { |
@@ -42,2 +42,3 @@ import _extends from '@babel/runtime/helpers/esm/extends'; | ||
this._parentNode = this._root.parentNode; | ||
this._parentNode.style.overflow = 'hidden'; | ||
this._elementResizeDetector = elementResizeDetectorMaker({ | ||
@@ -91,4 +92,9 @@ strategy: 'scroll' | ||
className = _this$props2.className; | ||
return React.createElement("span", _extends({ | ||
style: style, | ||
var containerStyle = { | ||
width: 0, | ||
height: 0, | ||
overflow: 'visible' | ||
}; | ||
return React.createElement("div", _extends({ | ||
style: _extends({}, containerStyle, style), | ||
className: className | ||
@@ -95,0 +101,0 @@ }, { |
{ | ||
"name": "@avinlab/react-size-me", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "React components for determine parent container size", | ||
@@ -5,0 +5,0 @@ "author": "Avin Grape <carcinogen75@gmail.com> (https://github.com/avin/)", |
@@ -85,2 +85,4 @@ //@flow | ||
this._parentNode.style.overflow = 'hidden'; | ||
this._elementResizeDetector = elementResizeDetectorMaker({ | ||
@@ -124,6 +126,12 @@ strategy: 'scroll', | ||
const containerStyle = { | ||
width: 0, | ||
height: 0, | ||
overflow: 'visible', | ||
}; | ||
return ( | ||
<span {...{ style, className }} ref={i => (this._root = i)}> | ||
<div {...{ style: { ...containerStyle, ...style }, className }} ref={i => (this._root = i)}> | ||
{this._renderContent()} | ||
</span> | ||
</div> | ||
); | ||
@@ -130,0 +138,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15165
299