Svelte Typeahead Versions Save

Accessible, fuzzy search typeahead component

v4.1.0

2 years ago

Features

  • render a "no-results" slot when the search value does not yield results
  • add value to the default slot props

v4.0.0

2 years ago

Breaking Changes

  • use .svelte.d.ts for the component TypeScript definition extension

v3.0.0

3 years ago

Breaking Changes

  • the ul element is rendered even without results to preserve the accessibility label

Fixes

  • disable form ARIA attributes in svelte-search
  • pass the correct aria-activedescendant item to svelte-search

Contributed by @Skovvart in #20

v2.4.1

3 years ago

Fixes

  • pass id to Search to fix aria-labelledby references (contributed by @Skovvart in #19 )

v2.4.0

3 years ago

Features

  • add limit prop to limit number of results; default value is Infinity

    <Typeahead limit={2} {data} {extract} />
    

v2.3.0

3 years ago

Features

  • add disable, filter props to disable and filter items from the result set (contributed by @Amerlander)

Fixes

  • bind the input element reference correctly to fix focusing behavior
  • don't pass the Typeahead id to Search

v2.2.0

3 years ago

Features

  • add inputAfterSelect prop to allow user to preserve or clear the input field after selecting a result; possible values are "update" | "clear" | "keep" (default is "update")

  • add searched value to dispatched "select" event detail (e.detail.searched)

    <Typeahead
      inputAfterSelect="clear"
      on:select="{(e) => {
        console.log(e.detail.searched);
      }}"
    />
    

v2.1.0

3 years ago

Features

  • include original item and originalIndex in dispatched "select" event

    <Typeahead
      on:select="{(e) => {
        console.log(e.detail.original);
        console.log(e.detail.originalIndex);
      }}"
    />
    

v2.0.0

3 years ago

Breaking Changes

  • upgrade svelte-search to version 1.0.0
  • defer to default label, placeholder props from search-svelte
  • use SvelteComponentTyped interface in TypeScript definitions

v1.0.0

3 years ago

Features

  • export reactive results array containing fuzzy results
  • add focusAfterSelect to opt in to focusing input after selecting a result
  • keydown default behavior is preventing if pressing "ArrowUp", "ArrowDown", or "Escape"

Breaking changes

  • focusAfterSelect is false by default
  • redesigned default styles
  • if using TS, Svelte version >=3.30 is required