Releases: metonym/svelte-typeahead
Releases · metonym/svelte-typeahead
v4.4.1
v4.4.0
v4.3.2
v4.3.1
v4.3.0
v4.2.4
v4.2.3
v4.2.2
v4.2.1
Fixes
- prevent keyboard selection and navigation of disabled results
- add missing annotation for
TItem.disabled
toresults
prop
Documentation
- add
pnpm
installation command - remove "disabling items after selection" example
- remove
id
fields fromdata
array - simplify dispatched events example
v4.2.0
Features
- use TypeScript generics so that the item type can be inferred from
data
value
<script lang="ts">
import Typeahead from "svelte-typeahead";
const data = [
{ id: 1, state: "North Carolina" },
{ id: 2, state: "North Dakota" },
{ id: 3, state: "South Carolina" },
{ id: 4, state: "South Dakota" },
];
</script>
<Typeahead
{data}
extract={(item) => {
return item.state; // type "string" is inferred
}}
/>