mirror of
https://github.com/zhigang1992/react.git
synced 2026-02-09 09:03:51 +08:00
style(radio): remove unused initial-value
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user