Replace onChange prop with onCheck for Radio and Checkbox

onChange is already defined for HTML inputs and returns event, but we want to return boolean/array of values

[MAILPOET-2773]
This commit is contained in:
Ján Mikláš
2020-05-19 10:50:28 +02:00
committed by Veljko V
parent 6521b4e59f
commit 49b866ad29
6 changed files with 17 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ const CheckboxGroup = ({
key={label}
name={name}
value={value}
onChange={(isChecked) => handleChange(value, isChecked)}
onCheck={(isChecked) => handleChange(value, isChecked)}
isFullWidth={isFullWidth}
{...attributes} // eslint-disable-line react/jsx-props-no-spreading
>