(words)
| 597 | }; |
| 598 | |
| 599 | const onInternalSearchSplit: BaseSelectProps['onSearchSplit'] = (words) => { |
| 600 | let patchValues: RawValueType[] = words; |
| 601 | |
| 602 | if (mode !== 'tags') { |
| 603 | patchValues = words |
| 604 | .map((word) => { |
| 605 | const opt = labelOptions.get(word); |
| 606 | return opt?.value; |
| 607 | }) |
| 608 | .filter((val) => val !== undefined); |
| 609 | } |
| 610 | |
| 611 | const newRawValues = Array.from(new Set<RawValueType>([...rawValues, ...patchValues])); |
| 612 | triggerChange(newRawValues); |
| 613 | newRawValues.forEach((newRawValue) => { |
| 614 | triggerSelect(newRawValue, true); |
| 615 | }); |
| 616 | }; |
| 617 | |
| 618 | // ========================== Context =========================== |
| 619 | const selectContext = React.useMemo<SelectContextProps>(() => { |
nothing calls this directly
no test coverage detected
searching dependent graphs…