The community member has a Radix select component that pulls options from a Shopify product via GraphQL. They have added a collection to the select to dynamically add the options, and have set the default selectValue data variable to the placeholder and text content to change the value on selection. The issue is that the community member wants the first option in the select to be automatically selected when the page loads. The community members have discussed using the defaultValue attribute from the Radix docs, but are unsure how to implement it in WebStudio. Some community members have suggested binding the first value in the collection to the Tabs instance, but this results in a fixed default value that doesn't change when other options are selected. The community has not found a clear solution to set the first option from the collection as the default on page load.
Hey All, I have a radix select that is pulling options in from my shopify product via the graphql. I have added a collection into the select to dynamically add the options to the select field and have selected the default selectValue data variable to the placeholder and text content in order to change the value on the selction. The only issue is that I would like to have the first option in the select automatically selected when the page loads. Can any one help me figure out how to do this?
Looking in the radix docs I notice it has a defaultValue but I'm not sure how we implement this in webstudio