fix: formik checkbox missing settings prop
This commit is contained in:
parent
e9b17bdf43
commit
fd802239f9
1 changed files with 15 additions and 1 deletions
|
|
@ -5,7 +5,21 @@ import { Checkbox } from '../base'
|
|||
const CheckboxInput = memo(({ label, textAlign, fullWidth, ...props }) => {
|
||||
const { name, onChange, value } = props.field
|
||||
|
||||
return <Checkbox name={name} onChange={onChange} value={value} {...props} />
|
||||
const settings = {
|
||||
enabled: props.enabled ?? true,
|
||||
label: label,
|
||||
disabledMessage: props.disabledMessage ?? ''
|
||||
}
|
||||
|
||||
return (
|
||||
<Checkbox
|
||||
name={name}
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
settings={settings}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
})
|
||||
|
||||
export default CheckboxInput
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue