Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/content/1.getting-started/2.migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,31 @@ This change affects the following components: `Modal`, `Popover`, `Slideover`, `
This change affects the following components: `Modal`, `Slideover`.
::

- The `prevent-close` prop in `Modal` and `Slideover` has been removed in favor of the `dismissible` prop that takes a boolean value:
```diff
<template>
- <UModal prevent-close />
+ <UModal :dismissible="true" />
</template>
```

- The `v-model` directive in `Pagination` has been renamed to `v-model:page` to control current page:

```diff
<template>
- <UPagination v-model="page" />
+ <UPagination v-model:page="page" />
</template>
```

- The `change` event in `Select`, `SelectMenu` and `RadioGroup` now emits the native `change` event, not the new chnage value, which is now emitted in the `update:modelValue` event:

```diff
<template></template>
- <USelectMenu v-model="country" :items="countries" @change="console.log(newVal)" />
+ <USelectMenu v-model="country" :items="countries" @update:modelValue="console.log(newVal)" />
```
Comment on lines +468 to +474
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by this? πŸ€” The @change event still exists in v3.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that in v2, I used to use the @change event to capture the new selected value. It used to give the new value, same behavior as @update:model-value event. But in v3, the @change event returns the native HTML change event, so I had to use @update:model-value instead to keep the same behavior.


### Changed composables

- The `useToast()` composable `timeout` prop has been renamed to `duration`:
Expand Down
Loading