Preloading Selected Values in Select and Checkbox Components (ShadCN for Svelte) #1742
Unanswered
leonardomporto
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using ShadCN for Svelte and encountering issues displaying preselected values in the Select and Checkbox components.
The components work fine when selecting new options, but they do not correctly display the initial value when the page loads.
Issue 1: Select Does Not Show Initial Value
I have a status field in my advertisement object, which can be "published" or "draft". The goal is to load the saved value from the database and display it correctly in Select.Trigger.
this simple html solution, is work.
===========
in the +page.svelte
I have the same problem for the Check Component.
If anyone can provide guidance or the best approach for handling this in ShadCN for Svelte, I would greatly appreciate it!
Beta Was this translation helpful? Give feedback.
All reactions