@react-stately/menu
Advanced tools
Comparing version 3.0.0-nightly-e60fb427c-240930 to 3.0.0-nightly-fb28ab3b4-241024
@@ -6,3 +6,3 @@ import { FocusStrategy, Key } from "@react-types/shared"; | ||
/** Controls which item will be auto focused when the menu opens. */ | ||
readonly focusStrategy: FocusStrategy; | ||
readonly focusStrategy: FocusStrategy | null; | ||
/** Opens the menu. */ | ||
@@ -9,0 +9,0 @@ open(focusStrategy?: FocusStrategy | null): void; |
{ | ||
"name": "@react-stately/menu", | ||
"version": "3.0.0-nightly-e60fb427c-240930", | ||
"version": "3.0.0-nightly-fb28ab3b4-241024", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,5 +25,5 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-stately/overlays": "^3.0.0-nightly-e60fb427c-240930", | ||
"@react-types/menu": "^3.0.0-nightly-e60fb427c-240930", | ||
"@react-types/shared": "^3.0.0-nightly-e60fb427c-240930", | ||
"@react-stately/overlays": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-types/menu": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-types/shared": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@swc/helpers": "^0.5.0" | ||
@@ -37,3 +37,3 @@ }, | ||
}, | ||
"stableVersion": "3.8.2" | ||
"stableVersion": "3.8.3" | ||
} |
@@ -20,3 +20,3 @@ /* | ||
/** Controls which item will be auto focused when the menu opens. */ | ||
readonly focusStrategy: FocusStrategy, | ||
readonly focusStrategy: FocusStrategy | null, | ||
@@ -53,3 +53,3 @@ /** Opens the menu. */ | ||
let overlayTriggerState = useOverlayTriggerState(props); | ||
let [focusStrategy, setFocusStrategy] = useState<FocusStrategy>(null); | ||
let [focusStrategy, setFocusStrategy] = useState<FocusStrategy | null>(null); | ||
let [expandedKeysStack, setExpandedKeysStack] = useState<Key[]>([]); | ||
@@ -86,7 +86,7 @@ | ||
...overlayTriggerState, | ||
open(focusStrategy: FocusStrategy = null) { | ||
open(focusStrategy: FocusStrategy | null = null) { | ||
setFocusStrategy(focusStrategy); | ||
overlayTriggerState.open(); | ||
}, | ||
toggle(focusStrategy: FocusStrategy = null) { | ||
toggle(focusStrategy: FocusStrategy | null = null) { | ||
setFocusStrategy(focusStrategy); | ||
@@ -93,0 +93,0 @@ overlayTriggerState.toggle(); |
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
53025