iamyuu / gridjs-svelte

A Svelte wrapper component for Grid.js
https://npm.im/gridjs-svelte
MIT License
57 stars 13 forks source link

rowClick working? #5

Closed larrym closed 3 years ago

larrym commented 3 years ago

I can't get the rowClick event to fire. What am I doing wrong? Nothing on the console.

const handleRowClick = (event) => {
    console.log('triggered click');
};

...
<div class="grid">
    {#await promise}
        <p>Loading ...</p>
    {:then data}
        <Grid {data} {columns} {style} on:rowClick={handleRowClick} />
    {/await}
</div>
iamyuu commented 3 years ago

Actually, I do not yet add any event dispatcher right now (I'll add it soon). For now, you can check the example at https://github.com/iamyuu/gridjs-svelte/issues/4#issuecomment-834303046.

iamyuu commented 3 years ago

added on v1.1.0, thanks for creating issues.