You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<scriptlang="ts">exportletopen=false;letselectedAdvancedDesigns=newSet<DesignManagementItemMeta>();letselectedTab: "standard"|"advanced"="standard";</script><Sheet.Rootbind:open><Sheet.Content><Tabs.Rootbind:value={selectedTab}><Tabs.Listclass="w-full justify-center"><Tabs.Triggervalue="standard">Standard</Tabs.Trigger><Tabs.Triggervalue="advanced">Advanced</Tabs.Trigger></Tabs.List><Tabs.Contentvalue="standard">///content for the standard tab</Tabs.Content><Tabs.Contentvalue="advanced"><divclass="some-styling">{#if selectedAdvancedDesigns.size>0}<IconButtonicon={{icon: LucideX}}variant="tertiarydestructive"
on:click={()=>{selectedAdvancedDesigns=newSet();//clicking this button makes the tab go to the "standard" value}}/>
{/if}</div></Tabs.Content></Tabs.Root></Sheet.Content></Sheet.Root>
for some reason the tab jumps to "standard" when I click a certain button. If I comment out the code inside the callback selectedAdvancedDesigns = new Set() this doesn't happen. Any idea what I am doing wrong?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a shadcn
Sheet
with aTabs
Component:for some reason the tab jumps to "standard" when I click a certain button. If I comment out the code inside the callback
selectedAdvancedDesigns = new Set()
this doesn't happen. Any idea what I am doing wrong?Beta Was this translation helpful? Give feedback.
All reactions