show exact match
This commit is contained in:
@@ -849,7 +849,12 @@ function InstitutionSelect({
|
||||
const matches = (institutions ?? []).filter((i) =>
|
||||
i.name.toLowerCase().includes(filter),
|
||||
);
|
||||
const shown = matches.slice(0, 60);
|
||||
const exact = filter
|
||||
? matches.find((i) => i.name.toLowerCase() === filter)
|
||||
: undefined;
|
||||
const shown = exact
|
||||
? [exact, ...matches.filter((i) => i !== exact).slice(0, 59)]
|
||||
: matches.slice(0, 60);
|
||||
const selected = institutions?.find((i) => i.name === value);
|
||||
return (
|
||||
<Field
|
||||
|
||||
Reference in New Issue
Block a user