Skip to content

Event handlers in each block don't work. #290

Closed
@dxlbnl

Description

@dxlbnl
{{#each items as item}}
    <Component on:change="method(item, event)" />
{{/each}}

Turns in to this code:

function renderEachBlock ( root, eachBlock_value, slider, slider__index, component ) {
// ...
component1.on( 'change', function ( event ) {
    var eachBlock_value = this.__svelte.eachBlock_value, component__index =  this.__svelte.component__index, slider = eachBlock_value[component__index];
    component.method(item, event);
});

But this.__svelte doesn't exist. So the handler can't be called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions