We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f874afd commit f4697d5Copy full SHA for f4697d5
build.washingtonpost.com/docs/components/input-search.mdx
@@ -563,9 +563,18 @@ export default function Example() {
563
const [term, setTerm] = useState("");
564
const results = searchCities(term);
565
566
+ const [selected, setSelected] = useState("");
567
+
568
return (
569
<Box css={{ width: "300px", height: "340px" }}>
- <InputSearch.Root aria-label="Example-Search" openOnFocus>
570
+ <Box css={{ marginBlockEnd: "$100" }}>
571
+ <strong>Selected value:</strong> {selected}
572
+ </Box>
573
+ <InputSearch.Root
574
+ aria-label="Example-Search"
575
+ openOnFocus
576
+ onSelect={(value) => setSelected(value)}
577
+ >
578
<InputSearch.Input
579
name="city"
580
id="city"
0 commit comments