SolidJSS
SolidJS2y ago
21 replies
𝔐𝔞𝔱𝔱𝔦𝔫

Why is this not reactive? (using signal + html open attribute)

I have the following code:
const [openMenu, setOpenMenu] = createSignal<boolean>(false);

<details
  class='dropdown'
  onclick={() => setOpenMenu(!openMenu())}
  open={openMenu()}
>


Why is this not reactive? I need to click twice to actually show the menu. But then I cannot even close it anymore. Am I missing something here?
Was this page helpful?