@react-aria/selection
Advanced tools
Comparing version 3.0.0-nightly.1128 to 3.0.0-nightly.1137
@@ -356,4 +356,5 @@ var { | ||
const autoFocusRef = useRef(autoFocus); | ||
useEffect(() => { | ||
if (autoFocus) { | ||
if (autoFocusRef.current) { | ||
let focusedKey = null; // Check focus strategy to determine which item to focus | ||
@@ -382,4 +383,5 @@ | ||
} | ||
} // eslint-disable-next-line react-hooks/exhaustive-deps | ||
} | ||
autoFocusRef.current = false; // eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []); | ||
@@ -386,0 +388,0 @@ let handlers = { |
@@ -332,4 +332,5 @@ import { useLocale, useCollator } from "@react-aria/i18n"; | ||
const autoFocusRef = useRef(autoFocus); | ||
useEffect(() => { | ||
if (autoFocus) { | ||
if (autoFocusRef.current) { | ||
let focusedKey = null; // Check focus strategy to determine which item to focus | ||
@@ -358,4 +359,5 @@ | ||
} | ||
} // eslint-disable-next-line react-hooks/exhaustive-deps | ||
} | ||
autoFocusRef.current = false; // eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []); | ||
@@ -362,0 +364,0 @@ let handlers = { |
{ | ||
"name": "@react-aria/selection", | ||
"version": "3.0.0-nightly.1128+a05cbb945", | ||
"version": "3.0.0-nightly.1137+9928efa25", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,9 +21,9 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/focus": "3.0.0-nightly.1128+a05cbb945", | ||
"@react-aria/i18n": "3.0.0-nightly.1128+a05cbb945", | ||
"@react-aria/interactions": "3.0.0-nightly.1128+a05cbb945", | ||
"@react-aria/utils": "3.0.0-nightly.1128+a05cbb945", | ||
"@react-stately/collections": "3.0.0-nightly.1128+a05cbb945", | ||
"@react-stately/selection": "3.0.0-nightly.1128+a05cbb945", | ||
"@react-types/shared": "3.0.0-nightly.1128+a05cbb945" | ||
"@react-aria/focus": "3.0.0-nightly.1137+9928efa25", | ||
"@react-aria/i18n": "3.0.0-nightly.1137+9928efa25", | ||
"@react-aria/interactions": "3.0.0-nightly.1137+9928efa25", | ||
"@react-aria/utils": "3.0.0-nightly.1137+9928efa25", | ||
"@react-stately/collections": "3.0.0-nightly.1137+9928efa25", | ||
"@react-stately/selection": "3.0.0-nightly.1137+9928efa25", | ||
"@react-types/shared": "3.0.0-nightly.1137+9928efa25" | ||
}, | ||
@@ -36,3 +36,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "a05cbb945c22d66c84eea5b1288fe7fc0e9cbce4" | ||
"gitHead": "9928efa2507bccd6cdfa9b79a1d7d8df22491015" | ||
} |
@@ -13,3 +13,3 @@ /* | ||
import {FocusEvent, HTMLAttributes, Key, KeyboardEvent, RefObject, useEffect} from 'react'; | ||
import {FocusEvent, HTMLAttributes, Key, KeyboardEvent, RefObject, useEffect, useRef} from 'react'; | ||
import {focusSafely, getFocusableTreeWalker} from '@react-aria/focus'; | ||
@@ -288,4 +288,5 @@ import {FocusStrategy, KeyboardDelegate} from '@react-types/shared'; | ||
const autoFocusRef = useRef(autoFocus); | ||
useEffect(() => { | ||
if (autoFocus) { | ||
if (autoFocusRef.current) { | ||
let focusedKey = null; | ||
@@ -314,2 +315,3 @@ | ||
} | ||
autoFocusRef.current = false; | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
@@ -316,0 +318,0 @@ }, []); |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
197496
2306