question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`RadioGroupProps.onChange` is not a `React.ChangeEventHandler<HTMLInputElement>`

See original GitHub issue

Version

undefined

Environment

TypeScript

Reproduction link

https://codesandbox.io/s/jpw403mn3

Steps to reproduce

run, click a radio

What is expected?

show has cancelable

What is actually happening?

show no cancelable


React.ChangeEventHandler should receive a SyntheticEvent( https://github.com/DefinitelyTyped/DefinitelyTyped/blob/db8be7aec245c2158be0bc2c9a8a8c3f8cdfcd96/types/react/index.d.ts#L494, https://reactjs.org/docs/events.html ) , which must have cancelable, bubbles, etc. but the param passed by rc-checkbox is not a SyntheticEvent, see https://github.com/react-component/checkbox/blob/master/src/Checkbox.jsx#L66

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

10reactions
yesmeckcommented, Mar 8, 2018

e.nativeEvent

4reactions
yesmeckcommented, Mar 8, 2018

@whtsky Fixing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RadioGroup Onchange is not firing in React - Stack Overflow
Issue. You pass an onChange prop to RadioGroup but access a handleChange prop that doesn't exist. const RadioGroup = (props) => { return ......
Read more >
RadioGroupProps - React Inputs Library - KendoReact API
Name Type Description children? React.ReactNode Sets the RadioGroup children. disabled? boolean Disable all radio buttons (see example). layout? "horizontal" | "vertical" Specifies the radio group layout....
Read more >
React onChange Events (With Examples) - Upmostly
The onChange event in React detects when the value of an input element changes. Let's dive into some common examples of how to...
Read more >
How to Handle Multiple Inputs with a Single onChange ...
When creating a form with React components, it is common to use an onChange handler to listen for changes to input elements and...
Read more >
react input onchange doesn't work - You.com | The AI Search ...
The state is only stored between renders for actual components. Pdindex is not a component, just a function that returns something. Its usage...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found