We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e9c32f commit 29944ceCopy full SHA for 29944ce
src/portal-popper.jsx
@@ -103,15 +103,16 @@ class PortalPopper extends Component {
103
}
104
105
_getArrowStyle () {
106
- const left = _.isNumber(this.state.arrowProps.left) ? Math.round(this.state.arrowProps.left) : null
107
- const top = _.isNumber(this.state.arrowProps.top) ? Math.round(this.state.arrowProps.top) : null
108
-
109
return {
110
- left,
111
- top,
+ left: this._getArrowProp('left'),
+ top: this._getArrowProp('top'),
112
113
114
+ _getArrowProp (position) {
+ return _.isNumber(this.state.arrowProps[position]) ? Math.round(this.state.arrowProps[position]) : null
+ }
115
+
116
componentWillUnmount () {
117
this.isUnmounted = true
118
this.popper && this.popper.destroy()
0 commit comments