MCPcopy Create free account
hub / github.com/react-component/select / setLabelOptions

Function setLabelOptions

src/hooks/useOptions.ts:27–35  ·  view source on GitHub ↗
(
      labelOptionsMap: Map<React.ReactNode, OptionType>,
      option: OptionType,
      key: string | number,
    )

Source from the content-addressed store, hash-verified

25 const labelOptions = new Map<React.ReactNode, OptionType>();
26
27 const setLabelOptions = (
28 labelOptionsMap: Map<React.ReactNode, OptionType>,
29 option: OptionType,
30 key: string | number,
31 ) => {
32 if (key && typeof key === 'string') {
33 labelOptionsMap.set(option[key], option);
34 }
35 };
36
37 const dig = (optionList: OptionType[], isChildren = false) => {
38 // for loop to speed up collection speed

Callers 1

digFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…