Hi,
Apparently if I define a click event (with a parameter) on the Chip component within an “Each” loop, it calls my function N times when the loop is rendering.
Example:
{#each chips as c,i}
<Chip outline={!c.checked} id={c.id} on:click={clickChip(i)}>{c.name}</Chip>
{/each}
This will call my “ClickChip” function 20 times automatically if I have an array of 20 chips. The expected behavior is to only call it when I click it.
This works fine if I dont supply a parameter. Seems to be a bug.