fix(toggle-small): only emit onChange on keyUp if it exists
MODIFY
packages/react/src/components/ToggleSmall/ToggleSmall.js
packages/react/src/components/ToggleSmall/ToggleSmall.js
@@ -58,7 +58,7 @@ const ToggleSmall = ({
onKeyUp={evt => {
if (match(evt, keys.Enter)) {
input.checked = !input.checked;
- onChange(evt);
+ onChange && onChange(evt);
onToggle(input.checked, id, evt);
}
}}

fix(toggle-small): only emit onChange on keyUp if it exists (#5931)