Skip to content

Commit 15f6d7b

Browse files
committed
docs(combo-box): add description to typeahead example
1 parent 66881ea commit 15f6d7b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

docs/src/pages/components/ComboBox.svx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ See how the combobox responds to user input and selection changes.
5959

6060
## Autocomplete with typeahead
6161

62+
Set `typeahead` to `true` to enable autocomplete with typeahead functionality. As users type, the input automatically suggests and completes matching items.
63+
64+
The typeahead feature uses prefix matching (case-insensitive) to filter items that start with the entered text. When a match is found, the suggestion is displayed with the untyped portion highlighted, allowing users to accept it or continue typing.
65+
66+
Note that when `typeahead` is enabled, the `shouldFilterItem` prop is ignored as the typeahead functionality provides its own filtering logic.
67+
6268
<FileSource src="/framed/ComboBox/TypeaheadComboBox" />
6369

6470
## Clear selection

docs/src/pages/framed/ComboBox/TypeaheadComboBox.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
{items}
2323
/>
2424
<br />
25-
<Button on:click={() => (selectedId = undefined)}
26-
>Set to undefined (unselected)</Button
27-
>
25+
<Button on:click={() => (selectedId = undefined)}>
26+
Set to undefined (unselected)
27+
</Button>

0 commit comments

Comments
 (0)