fix(checkbox, radio): change event interfaces correctly use TypeScript generics for value (#23044)

Co-authored-by: Liam DeBeasi <liamdebeasi@icloud.com>
This commit is contained in:
Evgeniy
2021-08-03 23:29:53 +03:00
committed by GitHub
parent fbe648406b
commit 8a941fd24c
5 changed files with 16 additions and 16 deletions

View File

@ -1,5 +1,5 @@
export interface CheckboxChangeEventDetail {
value: any;
export interface CheckboxChangeEventDetail<T = any> {
value: T;
checked: boolean;
}

View File

@ -271,11 +271,11 @@ export default defineComponent({
## Events
| Event | Description | Type |
| ----------- | ---------------------------------------------- | ---------------------------------------- |
| `ionBlur` | Emitted when the checkbox loses focus. | `CustomEvent<void>` |
| `ionChange` | Emitted when the checked property has changed. | `CustomEvent<CheckboxChangeEventDetail>` |
| `ionFocus` | Emitted when the checkbox has focus. | `CustomEvent<void>` |
| Event | Description | Type |
| ----------- | ---------------------------------------------- | --------------------------------------------- |
| `ionBlur` | Emitted when the checkbox loses focus. | `CustomEvent<void>` |
| `ionChange` | Emitted when the checked property has changed. | `CustomEvent<CheckboxChangeEventDetail<any>>` |
| `ionFocus` | Emitted when the checkbox has focus. | `CustomEvent<void>` |
## Shadow Parts