re-resizable
Advanced tools
Comparing version 6.9.7 to 6.9.8
@@ -8,2 +8,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var reactDom = require('react-dom'); | ||
var memoize = _interopDefault(require('fast-memoize')); | ||
@@ -684,2 +685,3 @@ | ||
Resizable.prototype.onMouseMove = function (event) { | ||
var _this = this; | ||
if (!this.state.isResizing || !this.resizable || !this.window) { | ||
@@ -770,3 +772,6 @@ return; | ||
} | ||
this.setState(newState); | ||
// For v18, update state sync | ||
reactDom.flushSync(function () { | ||
_this.setState(newState); | ||
}); | ||
if (this.props.onResize) { | ||
@@ -773,0 +778,0 @@ this.props.onResize(event, direction, this.resizable, delta); |
@@ -26,2 +26,3 @@ var __extends = (this && this.__extends) || (function () { | ||
import * as React from 'react'; | ||
import { flushSync } from 'react-dom'; | ||
import { Resizer } from './resizer'; | ||
@@ -582,2 +583,3 @@ import memoize from 'fast-memoize'; | ||
Resizable.prototype.onMouseMove = function (event) { | ||
var _this = this; | ||
if (!this.state.isResizing || !this.resizable || !this.window) { | ||
@@ -668,3 +670,6 @@ return; | ||
} | ||
this.setState(newState); | ||
// For v18, update state sync | ||
flushSync(function () { | ||
_this.setState(newState); | ||
}); | ||
if (this.props.onResize) { | ||
@@ -671,0 +676,0 @@ this.props.onResize(event, direction, this.resizable, delta); |
{ | ||
"name": "re-resizable", | ||
"version": "6.9.7", | ||
"version": "6.9.8", | ||
"description": "Resizable component for React.", | ||
@@ -56,3 +56,3 @@ "title": "re-resizable", | ||
"@types/react": "16.8.7", | ||
"@types/react-dom": "16.9.9", | ||
"@types/react-dom": "17.0.9", | ||
"@types/sinon": "9.0.10", | ||
@@ -59,0 +59,0 @@ "avaron": "0.2.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
153473
2946