docs: Change controlled CommandDialog from prop to event

Prop used in documentation :on-open-change, does not work and also seems to not exist in radix-vue Dialog component. So to properly control Dialog programmatically you need to use event @update:open.
This commit is contained in:
Andrei Ivanov 2024-05-07 10:17:56 +10:00 committed by GitHub
parent 9ebbd30175
commit 93df9fc8fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -101,7 +101,7 @@ watch(CmdJ, (v) => {
<span class="text-xs"></span>J <span class="text-xs"></span>J
</kbd> </kbd>
</p> </p>
<CommandDialog :open="open" :on-open-change="handleOpenChange"> <CommandDialog :open="open" @update:open="handleOpenChange">
<CommandInput placeholder="Type a command or search..." /> <CommandInput placeholder="Type a command or search..." />
<CommandList> <CommandList>
<CommandEmpty>No results found.</CommandEmpty> <CommandEmpty>No results found.</CommandEmpty>