@react-stately/utils
Advanced tools
Comparing version 3.10.0 to 3.10.1
@@ -28,3 +28,3 @@ | ||
let stepString = step.toString(); | ||
let pointIndex = stepString.indexOf("."); | ||
let pointIndex = stepString.indexOf('.'); | ||
let precision = pointIndex >= 0 ? stepString.length - pointIndex : 0; | ||
@@ -31,0 +31,0 @@ if (precision > 0) { |
@@ -20,3 +20,3 @@ /* | ||
let stepString = step.toString(); | ||
let pointIndex = stepString.indexOf("."); | ||
let pointIndex = stepString.indexOf('.'); | ||
let precision = pointIndex >= 0 ? stepString.length - pointIndex : 0; | ||
@@ -23,0 +23,0 @@ if (precision > 0) { |
@@ -26,3 +26,3 @@ var $ecn6s$react = require("react"); | ||
let wasControlled = isControlledRef.current; | ||
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`); | ||
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`); | ||
isControlledRef.current = isControlled; | ||
@@ -45,4 +45,4 @@ }, [ | ||
}; | ||
if (typeof value === "function") { | ||
console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"); | ||
if (typeof value === 'function') { | ||
console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320'); | ||
// this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates | ||
@@ -49,0 +49,0 @@ // when someone using useControlledState calls setControlledState(myFunc) |
@@ -20,3 +20,3 @@ import {useState as $3whtM$useState, useRef as $3whtM$useRef, useEffect as $3whtM$useEffect, useCallback as $3whtM$useCallback} from "react"; | ||
let wasControlled = isControlledRef.current; | ||
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`); | ||
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`); | ||
isControlledRef.current = isControlled; | ||
@@ -39,4 +39,4 @@ }, [ | ||
}; | ||
if (typeof value === "function") { | ||
console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"); | ||
if (typeof value === 'function') { | ||
console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320'); | ||
// this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates | ||
@@ -43,0 +43,0 @@ // when someone using useControlledState calls setControlledState(myFunc) |
{ | ||
"name": "@react-stately/utils", | ||
"version": "3.10.0", | ||
"version": "3.10.1", | ||
"description": "Spectrum UI components in React", | ||
@@ -33,3 +33,3 @@ "license": "Apache-2.0", | ||
}, | ||
"gitHead": "f645f29edc1322153fd60af4640cbcab1d992dbd" | ||
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
65559
0
46