You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/binding-this-each-block-pro.../main.svelte

14 lines
232 B

<script>
import Foo from './Foo.svelte';
export let visible = false;
export let items = [{ value: 'a', ref: null }];
</script>
{#if visible}
{#each items as item}
<Foo bind:this={item.ref}>{item.value}</Foo>
{/each}
{/if}