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

Function getSelectEnt

src/Select.tsx:509–521  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

507 // ========================= OptionList =========================
508 const triggerSelect = (val: RawValueType, selected: boolean, type?: DisplayInfoType) => {
509 const getSelectEnt = (): [RawValueType | LabelInValueType, DefaultOptionType] => {
510 const option = getMixedOption(val);
511 return [
512 labelInValue
513 ? {
514 label: option?.[mergedFieldNames.label],
515 value: val,
516 key: option?.key ?? val,
517 }
518 : val,
519 injectPropsWithOption(option),
520 ];
521 };
522
523 if (selected && onSelect) {
524 const [wrappedValue, option] = getSelectEnt();

Callers 1

triggerSelectFunction · 0.85

Calls 1

injectPropsWithOptionFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…