Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add contextual parameters to onChange for Select and DatePicker components #3671
Comments
|
@cobaltwhite can you please provide an example of what you are looking for? |
|
Sure, I am managing the states of series of baseweb components within a master component including the onChange handlers listed below. These functions are passed on as props to child components where contain baseweb form components such as input, checkbox, select and datepicker. I am trying to capture the name or id from the event in order to update the state at the master level. I can very easily capture the values of input and checkbox listed below, but select and datepicker doesn't seem to have this support.
|
|
Thank you. The main problem is that
|
|
Thank you. The issue I am facing is that I cant't get the target and subsequently 'name' from it. I have a master component with multiple children. Baseweb components are used within the children, so in order to handle the change from a master level by passing it through props, I either have to write a single onChange handler which I did for Input and Checkbox, or one for each component in the case Select and DatePicker as I wasn't able to retrieve the name. Not sure if this is achievable at the moment or I have to resort to the multiple handler temporary hack. |
<Select />and<DatePicker />don't offer the option of accessingname,idand other props once theonChangehandler triggers. Aneventobject with this information is accessible in theonChangehandler for<Input />.Feature description
Provide access to these variables for
SelectandDatePicker. It is needed when the component is being passed handler functions from an ancestor container.