rob-balfre / svelte-select

Svelte Select. A select component for Svelte
https://svelte-select-examples.vercel.app
Other
1.25k stars 175 forks source link

Grab the text inside the input #552

Closed Lucasmiguelmac closed 1 year ago

Lucasmiguelmac commented 1 year ago

Is there a way of accessing the actual text of the input?

For example:

<script lang="ts">
  import Select from "svelte-select";

  function handleChangeText(e: CustomEvent) {
    console.log(e.detail);
  }
</script>

<Select on:changeText={handleChangeText} />

Some context: I'm trying to achieve this using multiple={true}, so basically we would need to handle this as I'm typing on the input box

rob-balfre commented 1 year ago

By actual text do you mean 'filterText' or the text of the selected item?

On Tue, 14 Feb 2023, 8:11 am Lucas Miguel, @.***> wrote:

Is there a way of accessing the actual text of the input?

For example: