mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
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:
@ -1,5 +1,5 @@
|
||||
|
||||
export interface CheckboxChangeEventDetail {
|
||||
value: any;
|
||||
export interface CheckboxChangeEventDetail<T = any> {
|
||||
value: T;
|
||||
checked: boolean;
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user