rgossiaux / svelte-headlessui

Unofficial Svelte port of the Headless UI component library
https://svelte-headlessui.goss.io
MIT License
1.79k stars 97 forks source link

Can't bind popover's "open" prop to a boolean #153

Closed touficbatache closed 1 year ago

touficbatache commented 1 year ago

Describe the bug Can't bind a popover's open prop to a boolean in order to keep track of the open and closed states.

To Reproduce

<script lang="ts">
  let isPopoverOpen = false
</script>

<Popover bind:open={isPopoverOpen}>
   ...
</Popover>

doesn't work.

Library version 2.0.0

rgossiaux commented 1 year ago

<Popover> doesn't have an open prop, I recommend going back to the docs: https://svelte-headlessui.goss.io/docs/2.0/popover#showinghiding-the-popover