-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
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
Event handlers in each block don't work. #290
Comments
Ah, yeah — it's treating the component the same as it would treat a DOM node, which is incorrect. Thanks for flagging it. |
A simple workaround I use is omitting the iterated value from the event handler and sending it as the event:
|
@Rich-Harris Ah, so that's going on, I was thinking __svelte might be some legacy or something. But it was used too often in the codebase :). Another question, it isn't possible to make dynamic value:binds right? as in, take a propertypath, and bind that path to the component. i.e.:
The reason I stumbled onto this bug was because I want to dynamically generate the components, based on a simple data structure. @cristinecula Thanks for the advice, I might look into this, although it would leak a bit too much to |
[WIP] failing test for first bug in #290
[WIP] failing tests for second bug in #290
Both these bugs are now fixed — closing this issue |
Turns in to this code:
But this.__svelte doesn't exist. So the handler can't be called.
The text was updated successfully, but these errors were encountered: