Closed MentalGear closed 9 months ago
Hi;
Without a repro, I can try guessing what the problem is; i.e. I think you're not binding to the state variable.
Try:
<script>
let open = false;
</script>
<Drawer.Root bind:open>
...
Does that work?
What @shyakadavis, if you want the two-way binding to occur (meaning the child is able to update state in the parent) you must prefix the variable with bind
.
Describe the bug
When using the
open
prop to switch the modal/drawer, after the first open/close, it won't correctly trigger anymore, even blocking scroll.Reproduction
Use
open={true}
to init, then close the modal. You will notice that the page behind is not scrollable anymore (chrome latest).Logs
No response
System Info
Severity
annoyance