MCPcopy Index your code
hub / github.com/JedWatson/react-select / getFocusedOptionId

Function getFocusedOptionId

packages/react-select/src/Select.tsx:539–547  ·  view source on GitHub ↗
(
  focusableOptionsWithIds: FocusableOptionWithId<Option>[],
  focusedOption: Option
)

Source from the content-addressed store, hash-verified

537}
538
539const getFocusedOptionId = <Option,>(
540 focusableOptionsWithIds: FocusableOptionWithId<Option>[],
541 focusedOption: Option
542) => {
543 const focusedOptionId = focusableOptionsWithIds.find(
544 (option) => option.data === focusedOption
545 )?.id;
546 return focusedOptionId || null;
547};
548
549const getOptionLabel = <
550 Option,

Callers 3

constructorMethod · 0.85
SelectClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected