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
If I have an Item in the accordion that's wrapped in a fragment, the <Show when={}> component directly within the fragment does not react to state updates.
Here's the relevant code from the Stackblitz
import{Item}from'@solid-aria/collection';import{createSignal,Show}from'solid-js';import{Accordion}from'./Accordion';/** * There are two accordion items in here, one wrapped in a * fragment, and one wrapped in a div. When pressing the * trigger button, the text to the right of it should * disappear/appear, because it's wrapped in a * <Show when={visible()}></Show>. On the one wrapped in a * div it does, but the one wrapped in a fragment you have to * collapse & expand the Item header once to trigger the * state update. * * The accordion code is a straight copy/paste from https://github.com/solidjs-community/solid-aria/blob/main/packages/accordion/README.md */exportdefaultfunctionApp(){const[visible,setVisible]=createSignal(true);return(<Accordion><Itemkey="fragment"title="With fragment wrapper"><><buttonstyle={{color: visible() ? 'green' : 'red'}}onClick={()=>setVisible((v)=>!v)}>Trigger</button><Showwhen={visible()}>-Shouldappear/disappear</Show></></Item><Itemkey="div"title="With div wrapper"><div><buttonstyle={{color: visible() ? 'green' : 'red'}}onClick={()=>setVisible((v)=>!v)}>Trigger</button><Showwhen={visible()}>-Shouldappear/disappear</Show></div></Item></Accordion>);}
The text was updated successfully, but these errors were encountered:
See Stackblitz reproduction repo here: https://stackblitz.com/edit/solidjs-template-r95c6s?file=src/App.tsx
If I have an Item in the accordion that's wrapped in a fragment, the
<Show when={}>
component directly within the fragment does not react to state updates.Here's the relevant code from the Stackblitz
The text was updated successfully, but these errors were encountered: