Skip to content

Propagate events #6

Open
Open
@Rich-Harris

Description

@Rich-Harris

The corollary to #4 — there's currently no way to listen for events coming from a row component. One way would be to have a single catch-all event:

<VirtualList on:event='handleEvent(event)' ... />

In that situation, the row component would need to do this sort of thing:

<div on:click="fire('event', { type: 'select', row })">
  <!-- row markup here -->
</div>

It would be slightly nicer if the row component could look like this...

<div on:click="fire('select', { row })">
  <!-- row markup here -->
</div>

...but that would require some new way to propagate all events:

<:Component {component} on:* row={{item.data}} />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions