How do I programatically control Sheet
?
#620
-
I tried something like this, but it doesn't work! Is it actually possible or how do we do it? <script setup lang="ts">
import {
Sheet,
SheetContent,
SheetDescription,
SheetHeader,
SheetTitle
} from '@/components/ui/sheet'
import { ref } from 'vue'
let open = ref(false)
</script>
<template>
<main>
<button @click="open = true">Open</button>
{{ open }}
<Sheet v-bind:modal="open">
<SheetContent>
<SheetHeader>
<SheetTitle>Are you absolutely sure?</SheetTitle>
<SheetDescription>
This action cannot be undone. This will permanently delete your account and remove your
data from our servers.
</SheetDescription>
</SheetHeader>
</SheetContent>
</Sheet>
</main>
</template>
|
Beta Was this translation helpful? Give feedback.
Answered by
sadeghbarati
Jun 20, 2024
Replies: 1 comment 1 reply
-
Can you try |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Rohithgilla12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you try
v-model:open
instead ofv-bind:modal
?