Skip to content

Commit 16452b2

Browse files
committed
fix(radio-group): accept any value
fixes #15334
1 parent baefda3 commit 16452b2

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

core/src/components.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import '@stencil/core';
88

9-
import 'ionicons';
9+
import 'ionicons'
1010
import {
1111
ActionSheetButton,
1212
ActionSheetOptions,
@@ -3169,7 +3169,7 @@ export namespace Components {
31693169
/**
31703170
* the value of the radio group.
31713171
*/
3172-
'value': string;
3172+
'value': any;
31733173
}
31743174
interface IonRadioGroupAttributes extends StencilHTMLAttributes {
31753175
'allowEmptySelection'?: boolean;
@@ -3181,11 +3181,11 @@ export namespace Components {
31813181
/**
31823182
* Emitted when the value has changed.
31833183
*/
3184-
'onIonChange'?: (event: CustomEvent<TextInputChangeEvent>) => void;
3184+
'onIonChange'?: (event: CustomEvent<InputChangeEvent>) => void;
31853185
/**
31863186
* the value of the radio group.
31873187
*/
3188-
'value'?: string;
3188+
'value'?: any;
31893189
}
31903190

31913191
interface IonRadio {
@@ -3209,7 +3209,7 @@ export namespace Components {
32093209
/**
32103210
* the value of the radio.
32113211
*/
3212-
'value': string;
3212+
'value': any;
32133213
}
32143214
interface IonRadioAttributes extends StencilHTMLAttributes {
32153215
/**
@@ -3256,7 +3256,7 @@ export namespace Components {
32563256
/**
32573257
* the value of the radio.
32583258
*/
3259-
'value'?: string;
3259+
'value'?: any;
32603260
}
32613261

32623262
interface IonRange {

core/src/components/radio-group/radio-group.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, Element, Event, EventEmitter, Listen, Prop, Watch } from '@stencil/core';
22

3-
import { TextInputChangeEvent } from '../../interface';
3+
import { InputChangeEvent } from '../../interface';
44

55
@Component({
66
tag: 'ion-radio-group'
@@ -38,18 +38,18 @@ export class RadioGroup {
3838
/**
3939
* the value of the radio group.
4040
*/
41-
@Prop({ mutable: true }) value?: string;
41+
@Prop({ mutable: true }) value?: any;
4242

4343
@Watch('value')
44-
valueChanged(value: string | undefined) {
44+
valueChanged(value: any | undefined) {
4545
this.updateRadios();
4646
this.ionChange.emit({ value });
4747
}
4848

4949
/**
5050
* Emitted when the value has changed.
5151
*/
52-
@Event() ionChange!: EventEmitter<TextInputChangeEvent>;
52+
@Event() ionChange!: EventEmitter<InputChangeEvent>;
5353

5454
@Listen('ionRadioDidLoad')
5555
onRadioDidLoad(ev: Event) {

core/src/components/radio-group/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ radio button within the same group.
1818
| `allowEmptySelection` | `allow-empty-selection` | | `boolean` |
1919
| `disabled` | `disabled` | | `boolean` |
2020
| `name` | `name` | The name of the control, which is submitted with the form data. | `string` |
21-
| `value` | `value` | the value of the radio group. | `string` |
21+
| `value` | -- | the value of the radio group. | `any` |
2222

2323

2424
## Events

core/src/components/radio/radio.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class Radio {
5252
/**
5353
* the value of the radio.
5454
*/
55-
@Prop({ mutable: true }) value!: string;
55+
@Prop({ mutable: true }) value!: any;
5656

5757
/**
5858
* Emitted when the radio loads.

core/src/components/radio/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ An `ion-radio-group` can be used to group a set of radios. When radios are insid
1919
| `disabled` | `disabled` | | `boolean` |
2020
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `Mode` |
2121
| `name` | `name` | The name of the control, which is submitted with the form data. | `string` |
22-
| `value` | `value` | the value of the radio. | `string` |
22+
| `value` | -- | the value of the radio. | `any` |
2323

2424

2525
## Events

0 commit comments

Comments
 (0)