add custom parameters into onChange callback
See original GitHub issueIt 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) {
console.log(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:
- Created 8 years ago
- Comments:11
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
On the second approach,
onChange={(e) => this.handleSelect(item, e)}
kind of does it.Or what about this approach?
onChange=this.handleSelect.bind(this, e)
.