Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5: $$index is not defined inside each block #10017

Closed
rob-balfre opened this issue Dec 28, 2023 · 1 comment · Fixed by #10063
Closed

Svelte 5: $$index is not defined inside each block #10017

rob-balfre opened this issue Dec 28, 2023 · 1 comment · Fixed by #10063
Assignees

Comments

@rob-balfre
Copy link
Contributor

Describe the bug

$$index is not defined when trying to access the each block index if there is a bind:group

{#each options as option, i }
    <li onpointerover={() => handle_event(i)}>
        <input id={option} type="radio" bind:group={value} value={option} />
        {option}
    </li>
{/each}

Reproduction

REPL

Logs

N/A

System Info

N/A

Severity

annoyance

@rob-balfre rob-balfre changed the title v5 bug: $$index is not defined inside each block Svelte 5: $$index is not defined inside each block Dec 28, 2023
@trueadm trueadm self-assigned this Jan 2, 2024
@rob-balfre
Copy link
Contributor Author

@trueadm brill, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants