style(radio): remove unused initial-value

This commit is contained in:
unix
2020-05-23 08:20:01 +08:00
parent a360d1b83b
commit f17bb28223
2 changed files with 2 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react'
export interface RadioConfig {
updateState: (value: string) => void
updateState?: (value: string) => void
disabledAll: boolean
value?: string
inGroup: boolean
@@ -9,7 +9,6 @@ export interface RadioConfig {
const defaultContext = {
disabledAll: false,
updateState: () => {},
inGroup: false,
}

View File

@@ -77,7 +77,7 @@ const Radio: React.FC<React.PropsWithChildren<RadioProps>> = ({
}
setSelfChecked(!selfChecked)
if (inGroup) {
updateState(radioValue as string)
updateState && updateState(radioValue as string)
}
onChange && onChange(selfEvent)
}