tree structure: granular updates and retain open state
can only replace the whole tree at once so I tried reconcile with a store, but I don't want all <details> to close when it happens
https://playground.solidjs.com/anonymous/c4a3c7e0-c9d8-454f-8a70-7766b67cab75
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
4 Replies
A potential problem is that For operates using reference equality, but object.entries will produce a new array of (new) key/value pairs (as two element arrays), so you won't keep reference equality
Also, probably not related to your problem, but using if/else branching in js (rather than in jsx) means that you won't see updates unless the function callback runs again (which is not how it is meant to work by design)
oops forgot about that, updated to use <Show>
Better to use object.keys
And then index
Not sure if it'd solve your problem, if it doesn't, I'd need to take a better look
that seems to work, thx