@react-aria/focus
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -171,2 +171,3 @@ var { | ||
let focusedNode = useRef(); | ||
let raf = useRef(null); | ||
useEffect(() => { | ||
@@ -245,3 +246,3 @@ let scope = scopeRef.current; | ||
requestAnimationFrame(() => { | ||
raf.current = requestAnimationFrame(() => { | ||
focusedNode.current.focus(); | ||
@@ -262,3 +263,7 @@ }); | ||
}; | ||
}, [scopeRef, contain]); | ||
}, [scopeRef, contain]); // eslint-disable-next-line arrow-body-style | ||
useEffect(() => { | ||
return () => cancelAnimationFrame(raf.current); | ||
}, []); | ||
} | ||
@@ -265,0 +270,0 @@ |
@@ -140,2 +140,3 @@ import { useFocus, useFocusVisible, useFocusWithin, useKeyboard } from "@react-aria/interactions"; | ||
let focusedNode = useRef(); | ||
let raf = useRef(null); | ||
useEffect(() => { | ||
@@ -214,3 +215,3 @@ let scope = scopeRef.current; | ||
requestAnimationFrame(() => { | ||
raf.current = requestAnimationFrame(() => { | ||
focusedNode.current.focus(); | ||
@@ -231,3 +232,7 @@ }); | ||
}; | ||
}, [scopeRef, contain]); | ||
}, [scopeRef, contain]); // eslint-disable-next-line arrow-body-style | ||
useEffect(() => { | ||
return () => cancelAnimationFrame(raf.current); | ||
}, []); | ||
} | ||
@@ -234,0 +239,0 @@ |
{ | ||
"name": "@react-aria/focus", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Spectrum UI components in React", | ||
@@ -17,9 +17,9 @@ "license": "Apache-2.0", | ||
"type": "git", | ||
"url": "https://github.com/adobe-private/react-spectrum-v3" | ||
"url": "https://github.com/adobe/react-spectrum" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/interactions": "^3.0.0", | ||
"@react-aria/utils": "^3.0.0", | ||
"@react-types/shared": "^3.0.0", | ||
"@react-aria/interactions": "^3.0.1", | ||
"@react-aria/utils": "^3.0.1", | ||
"@react-types/shared": "^3.0.1", | ||
"classnames": "^2.2.5" | ||
@@ -33,3 +33,3 @@ }, | ||
}, | ||
"gitHead": "a32224fdf009d69cf594f32ad18ac86d7ebb8a52" | ||
"gitHead": "ac0b7a7ba0edccd1c9ab4f849022ad6d2ccd19ed" | ||
} |
# @react-aria/focus | ||
This package is part of [react-spectrum](https://github.com/adobe-private/react-spectrum-v3). See the repo for more details. | ||
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. |
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
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
157533
1678
Updated@react-aria/utils@^3.0.1
Updated@react-types/shared@^3.0.1