MCPcopy Index your code
hub / github.com/primer/react / getDefaultItemFilter

Function getDefaultItemFilter

packages/react/src/Autocomplete/AutocompleteMenu.tsx:27–31  ·  view source on GitHub ↗
(filterValue: string)

Source from the content-addressed store, hash-verified

25const menuScrollMargins: ScrollIntoViewOptions = {startMargin: 0, endMargin: 8}
26
27function getDefaultItemFilter<T extends AutocompleteMenuItem>(filterValue: string) {
28 return function (item: T, _i: number) {
29 return Boolean(item.text?.toLowerCase().startsWith(filterValue.toLowerCase()))
30 }
31}
32
33function getdefaultCheckedSelectionChange<T extends AutocompleteMenuItem>(
34 setInputValueFn: (value: string) => void,

Callers 1

AutocompleteMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected