We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dispatch()
I created a REPL for an issue with Svelte dispatch not being called:
Open the REPL
Open the browser console
Go on the "About" page using the link
No message in console. I sould see the message: "handleInput"
<script> import Select from 'svelte-select'; import { createEventDispatcher } from 'svelte'; export let value = undefined; export let id = undefined; const dispatch = createEventDispatcher(); let result; let items = [ { value: 'one', label: 'One' }, { value: 'two', label: 'Two' }, { value: 'three', label: 'Three' }, ]; $: if (id !== undefined) { result = id; } $: if (result != undefined) { value = { value: 'custom', label: 'Custom' }; console.log("this should dispatch!") dispatch('input', value); console.log("is it dispatched?") } </script> <Select {value} {items} on:change on:input />
The dispatch('input', value) is completely ignored.
dispatch('input', value)
Why?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I created a REPL for an issue with Svelte dispatch not being called:
Steps to reproduce
Open the REPL
Open the browser console
Go on the "About" page using the link
No message in console. I sould see the message: "handleInput"
Relevant code
The
dispatch('input', value)
is completely ignored.Why?
The text was updated successfully, but these errors were encountered: