@yamada-ui/use-controllable-state
Advanced tools
Comparing version 0.0.0-dev-20230606151107 to 0.0.0-dev-20230620132312
@@ -34,3 +34,4 @@ "use strict"; | ||
const [defaultValue, setDefaultValue] = (0, import_react.useState)(props.defaultValue); | ||
const controlled = props.value !== void 0; | ||
const controlledRef = (0, import_react.useRef)(props.value !== void 0); | ||
const controlled = controlledRef.current; | ||
const value = controlled ? props.value : defaultValue; | ||
@@ -37,0 +38,0 @@ const setValue = (0, import_utils.useCallbackRef)( |
{ | ||
"name": "@yamada-ui/use-controllable-state", | ||
"version": "0.0.0-dev-20230606151107", | ||
"version": "0.0.0-dev-20230620132312", | ||
"description": "Yamada UI useControllableState custom hook", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@yamada-ui/utils": "0.0.0-dev-20230606151107" | ||
"@yamada-ui/utils": "0.1.1" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
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
6576
89
+ Added@yamada-ui/utils@0.1.1(transitive)
- Removed@yamada-ui/utils@0.0.0-dev-20230606151107(transitive)
Updated@yamada-ui/utils@0.1.1