You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not really feasible since the event could come from various sources of user interaction. (touch, click, keypress, etc... ). However, your issue is unrelated. you could just simply use a Higher Order Function to achieve the same result in a much more readable and predictable way:
createHandleDataChange=(id)=>(date)=>{// Do something with id and date}render(){return(<><DatePicker{/*...*/}onChange={this.createHandleDataChange('my-first-date-picker')}/><DatePicker{/*...*/}onChange={this.createHandleDataChange('my-second-date-picker')}/><DatePicker{/*...*/}onChange={this.createHandleDataChange('my-third-date-picker')}/></>);}
Hi!
Fantastic job, thank you!
Just a suggestion: somehow pass the id/name of the date picker to the onChange so we can wire multiple pickers with one handler.
Thanks
Georgios
The text was updated successfully, but these errors were encountered: