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

Destructuring let attribute in <For> component is removed #148

Closed
bicarlsen opened this issue Oct 2, 2024 · 0 comments · Fixed by #149
Closed

Destructuring let attribute in <For> component is removed #148

bicarlsen opened this issue Oct 2, 2024 · 0 comments · Fixed by #149

Comments

@bicarlsen
Copy link

As mentioned in leptos Issue 3509, the let attribute of a <For> component can be destructured with the let(/* pattern */) syntax, however leptosfmt completely removes this.
i.e.

<For
  each=move || list.get()
  key=|Item { name, .. }| name.clone()
  let(Item { name, value })  // this will be stripped
>

is formatted to

<For
  each=move || list.get()
  key=|Item { name, .. }| name.clone()
  let  // destructured pattern is stripped
>
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.

1 participant