@chakra-ui/react-utils
Advanced tools
Comparing version
# @chakra-ui/react-utils | ||
## 1.1.2 | ||
### Patch Changes | ||
- [`82f08867f`](https://github.com/chakra-ui/chakra-ui/commit/82f08867fa4825d647a3b9cc805220d9364f2f3f) | ||
[#3864](https://github.com/chakra-ui/chakra-ui/pull/3864) Thanks | ||
[@segunadebayo](https://github.com/segunadebayo)! - Update types for | ||
`mergeRefs` to include null | ||
- Updated dependencies | ||
[[`e9ac4cc76`](https://github.com/chakra-ui/chakra-ui/commit/e9ac4cc7629cd79efc753b4e3353bacdad46cd7d)]: | ||
- @chakra-ui/utils@1.7.0 | ||
## 1.1.1 | ||
@@ -4,0 +17,0 @@ |
@@ -35,3 +35,6 @@ "use strict"; | ||
if (!context && strict) { | ||
throw new Error(errorMessage); | ||
var error = new Error(errorMessage); | ||
error.name = "ContextError"; | ||
Error.captureStackTrace == null ? void 0 : Error.captureStackTrace(error, useContext); | ||
throw error; | ||
} | ||
@@ -38,0 +41,0 @@ |
@@ -44,5 +44,5 @@ "use strict"; | ||
return function (value) { | ||
return function (node) { | ||
refs.forEach(function (ref) { | ||
return assignRef(ref, value); | ||
return assignRef(ref, node); | ||
}); | ||
@@ -49,0 +49,0 @@ }; |
@@ -25,3 +25,6 @@ import * as React from "react"; | ||
if (!context && strict) { | ||
throw new Error(errorMessage); | ||
var error = new Error(errorMessage); | ||
error.name = "ContextError"; | ||
Error.captureStackTrace == null ? void 0 : Error.captureStackTrace(error, useContext); | ||
throw error; | ||
} | ||
@@ -28,0 +31,0 @@ |
@@ -37,6 +37,6 @@ import { isFunction } from "@chakra-ui/utils"; | ||
return value => { | ||
refs.forEach(ref => assignRef(ref, value)); | ||
return node => { | ||
refs.forEach(ref => assignRef(ref, node)); | ||
}; | ||
} | ||
//# sourceMappingURL=refs.js.map |
@@ -17,4 +17,4 @@ /// <reference types="react" /> | ||
*/ | ||
export declare function mergeRefs<T>(...refs: (ReactRef<T> | undefined)[]): (value: T) => void; | ||
export declare function mergeRefs<T>(...refs: (ReactRef<T> | undefined)[]): (node: T | null) => void; | ||
export {}; | ||
//# sourceMappingURL=refs.d.ts.map |
{ | ||
"name": "@chakra-ui/react-utils", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "React utilities and helpers for Chakra UI", | ||
@@ -53,3 +53,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@chakra-ui/utils": "^1.5.1" | ||
"@chakra-ui/utils": "^1.7.0" | ||
}, | ||
@@ -56,0 +56,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
28849
5.02%265
2.32%Updated