MCPcopy Create free account
hub / github.com/adobe/react-spectrum / toggle

Function toggle

packages/react-stately/src/select/useSelectState.ts:262–267  ·  view source on GitHub ↗
(focusStrategy: FocusStrategy | null = null)

Source from the content-addressed store, hash-verified

260 }
261 },
262 toggle(focusStrategy: FocusStrategy | null = null) {
263 if (listState.collection.size !== 0 || props.allowsEmptyCollection) {
264 setFocusStrategy(focusStrategy);
265 triggerState.toggle();
266 }
267 },
268 isFocused,
269 setFocused
270 };

Callers

nothing calls this directly

Calls 1

toggleMethod · 0.65

Tested by

no test coverage detected