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

Select options non reactive #386

Closed
jer3m01 opened this issue Apr 15, 2024 · 0 comments · Fixed by #401
Closed

Select options non reactive #386

jer3m01 opened this issue Apr 15, 2024 · 0 comments · Fixed by #401

Comments

@jer3m01
Copy link
Member

jer3m01 commented Apr 15, 2024

Extract from https://discord.com/channels/722131463138705510/1063803756388548709/1228319433013989447

It is in this line: https://github.com/kobaltedev/kobalte/blob/main/packages/core/src/primitives/create-collection/create-collection.ts#L40
The effect does not reexecute when a resource's value changes (from nothing to the resolved data). Replacing it with a render effect makes it work, but I don't know if that is the correct solution.
I have made a broken-down reproduction of it here: https://stackblitz.com/edit/solidjs-templates-g7d9h6?file=src%2Fcomponents%2Flistbox%2Flistbox-root.tsx
I added some console.logs so when you change the render effect here: https://stackblitz.com/edit/solidjs-templates-g7d9h6?file=src%2Fcomponents%2Fprimitives%2Fcreate-collection%2Fcreate-collection.ts%3AL50
back to a normal effect you can observe where the collection is right and where it does not contain anything anymore.

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