hexops / vecty

Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.
BSD 3-Clause "New" or "Revised" License
2.79k stars 144 forks source link

Rerendering List Replaces First ListItem #307

Open cwarden opened 4 months ago

cwarden commented 4 months ago

When a List is rerendered, the first listitem is replaced. If it has focus, it loses focus. The other listitems don't have this problem.

Here's an example using the todomvc application.

vecty-rerender-list-bug

cwarden commented 4 months ago

I don't understand the code yet, but the problem appears to be in reconcileChildren, in which stableKey doesn't get set.

36a9ad6395d5375aa11fa833edd816382472895c "fixes" the issue.