Closed sunny-repo88 closed 10 months ago
You are using Controlled Component
which you control the (open
) state (show/hide
)
in this case, you should handle the hiding or showing of the component
You could use
v-model:open="open"
easy way ✅ or:open="open"
and @update:open="(openState) => (open = openState)"
🙅 Dialog demo here: https://stackblitz.com/edit/github-eurciq?file=src%2FApp.vue
If you want to use UnControlled Component
and still want to show dialog by default you could use
defaultOpen
prop which you can read about in MAIN radix-vue
documentation
@sadeghbarati , thanks!
Environment
Link to minimal reproduction
https://github.com/sunny-repo88/shadcn-vue-dialog-bug
Steps to reproduce
Describe the bug
right top icon cannot close the dialog
Expected behavior
right top icon should be able to close the dialog
Conext & Screenshots (if applicable)
No response