Skip to content

v0.3.1

Compare
Choose a tag to compare
@metonym metonym released this 08 Feb 01:14
· 40 commits to master since this release
  • focusKey action should reflect updated actions
<script>
  import { focusKey } from "svelte-focus-key";

  let selectText = false;
  let key = "k";
  let value = "text";
</script>

<input
  use:focusKey={{ key, selectText }}
  placeholder={'Press "k" to focus'}
  bind:value
/>

<button
  on:click={() => {
    key = key === "/" ? "k" : "/";
    selectText = !selectText;
  }}
>
  Update options
</button>