Skip to content

Commit 78c4706

Browse files
committed
fix chakra RadioWidget value change
1 parent 22ddf8e commit 78c4706

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/chakra-ui/src/RadioWidget/RadioWidget.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FocusEvent } from 'react';
1+
import { ChangeEvent, FocusEvent } from 'react';
22
import { Stack } from '@chakra-ui/react';
33
import {
44
ariaDescribedByIds,
@@ -30,7 +30,8 @@ export default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSc
3030
const { enumOptions, enumDisabled, emptyValue } = options;
3131
// const chakraProps = getChakra({ uiSchema });
3232

33-
const _onChange = (nextValue: any) => onChange(enumOptionsValueForIndex<S>(nextValue, enumOptions, emptyValue));
33+
const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>
34+
onChange(enumOptionsValueForIndex<S>(value, enumOptions, emptyValue));
3435
const _onBlur = ({ target: { value } }: FocusEvent<HTMLInputElement>) =>
3536
onBlur(id, enumOptionsValueForIndex<S>(value, enumOptions, emptyValue));
3637
const _onFocus = ({ target: { value } }: FocusEvent<HTMLInputElement>) =>

0 commit comments

Comments
 (0)