Skip to content

Releases: metonym/svelte-typeahead

v4.4.1

12 Nov 15:43
Compare
Choose a tag to compare

Fixes

  • replace aria-owns with aria-controls to resolve a11y-role-has-required-aria-props warning (99bfa7b, #73)

v4.4.0

08 Nov 15:27
Compare
Choose a tag to compare

Features

  • add showAllResultsOnFocus prop to display all results when focusing an empty input (3fc92ef, #65)

Fixes

v4.3.2

01 Sep 17:34
Compare
Choose a tag to compare

Fixes

  • allow results to be selected if using showDropdownOnFocus (90880ce, #61)

v4.3.1

29 Aug 18:30
Compare
Choose a tag to compare

Fixes

  • skip disabled results when auto-selecting a result (9e87768, #57)

v4.3.0

29 Aug 17:55
Compare
Choose a tag to compare

Features

  • add showDropdownOnFocus prop to only show dropdown if the search input is focused (7aeb4d4, #55)

v4.2.4

05 Jul 17:17
Compare
Choose a tag to compare

Fixes

  • set dropdown menu z-index: 1 when expanded (8fee120, #49)

v4.2.3

04 Jul 17:26
Compare
Choose a tag to compare

Fixes

  • update selected index when hovering over a result (06a5415, #48)

v4.2.2

20 Mar 14:04
Compare
Choose a tag to compare

Fixes

  • pressing "ArrowUp" on last item should not reset highlighted index (6d63028, #42 contributed by @elimisteve)

v4.2.1

30 Oct 19:39
Compare
Choose a tag to compare

Fixes

  • prevent keyboard selection and navigation of disabled results
  • add missing annotation for TItem.disabled to results prop

Documentation

  • add pnpm installation command
  • remove "disabling items after selection" example
  • remove id fields from data array
  • simplify dispatched events example

v4.2.0

26 Oct 15:50
Compare
Choose a tag to compare

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
  }}
/>