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.

add custom parameters into onChange callback

See original GitHub issue

It will be very good to add custom parameters into onChange callback function.

Just like this:

    fireChangeEvent: function fireChangeEvent(newState) {
        if (newState.value !== this.state.value && this.props.onChange) {
            this.props.onChange(newState.value, newState.values, this.props.onChangeArguments);

var model = {
'a': 10

onItemChange: function(newState, newStates, customArgs) {

<Select asyncOptions={this.loadOptions} placeholder={gettext('Item')} onChange={this.onItemChange} onChangeArguments={model}/>

I can commit it if it is okay for you.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11

github_iconTop GitHub Comments

nvmacommented, May 16, 2016

On the second approach, onChange={(e) => this.handleSelect(item, e)} kind of does it.

mukkachaitanyacommented, Jun 28, 2017

Or what about this approach? onChange=this.handleSelect.bind(this, e) .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Passing an additional parameter with an onChange event
This works fine. What I am trying to do instead: I am attempting to add a section parameter to the handleChange function as...
Read more >
Passing multiple parameters to onChange in React | bobbyhadz
To pass multiple parameters to onChange in React, pass an arrow function to the `onChange` prop. The arrow function will get called with...
Read more >
How to pass a parameter to an event handler or callback
Example 2: In this example, we will use the arrow function to create a new function that calls the function call with the...
Read more >
ASP.NET Core Blazor event handling - Microsoft Learn
Blazor supports custom event arguments, which enable you to pass arbitrary data to .NET event handlers with custom events.
Read more >
BEE Plugin Tech Docs | Tracking Message Changes
Code Description Type 0100 Text dropped module 0101 Text dragged module 0102 Text deleted module
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 Post

No results found

github_iconTop Related Hashnode Post

No results found