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.

Selecting a value does not trigger form onChange

See original GitHub issue

https://codesandbox.io/s/damp-pond-i0dq0

Here you can see console.log from a regular <select> but not from <Select> from react-select.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gormonncommented, Jul 4, 2022

@Rall3n The problem is reproduced in 4.3.1 Added an event counter to the example, for clarity. This approach is often used to catch any changes in the form. For example, in forms with uncontrolled components. ex: react-hook-form

https://codesandbox.io/s/polished-surf-ljlczn?file=/src/index.js

1reaction
panukettucommented, Aug 17, 2020

It sure seems that updating to latest version still has the bug occuring. It is quite clear from my example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Onchange event is not triggered when the value of an input is ...
change/input events arent triggered by programmatic changes to value. · "It looks like your post is mostly code; please add some more details." ......
Read more >
onChange doesn't trigger when state updated #3401 - GitHub
handleChange is a callback to the onChange of the Select component. It won't fire when you change the state and the value prop...
Read more >
SCR19: Using an onchange event on a select element ... - W3C
Navigate to the trigger select element, navigate through the options but do not change the value. Check that the matching option values are...
Read more >
How can I trigger an onchange event manually in javascript?
Trigger an event IMMEDIATELY on mouse click, not after I let go of the mouse - JavaScript? The onchange event is not working...
Read more >
.change() | jQuery API Documentation
The change event is sent to an element when its value changes. This event is limited to <input> elements, <textarea> boxes and <select>...
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