showing results for - "jsx on select value change"
Abril
16 Feb 2017
1var MySelect = React.createClass({
2     getInitialState: function() {
3         return {
4             value: 'select'
5         }
6     },
7     change: function(event){
8         this.setState({value: event.target.value});
9     },
10     render: function(){
11        return(
12           <div>
13               <select id="lang" onChange={this.change} value={this.state.value}>
14                  <option value="select">Select</option>
15                  <option value="Java">Java</option>
16                  <option value="C++">C++</option>
17               </select>
18               <p></p>
19               <p>{this.state.value}</p>
20           </div>
21        );
22     }
23});
24
25React.render(<MySelect />, document.body);
26
queries leading to this page
react select change valuereact select on change set valueonchange select value reactjsselect option change event reactwhere i should keep onchange in select option html reactselect on change set reactchange a input value according to the select option reactreact select change value after selectedvalue changes in select in reacttarget react select on changereact select on changereact onchange select option value updateon change in select reactjsreact select change value programmaticallyreact select change the valuereact select change value targetreact select value onchangereact change select valuechange rendered value on select elementselect change option reactget select value on change reactreact select changereact change component on selected optionhandle change select reactreact get value of select on changeselect in react changehandle select change reactreact select handle changereact on select changereact change component on selectselect on change in reactselect on change reacthow to change the item according to select option in react jsselect change html value reactassign one value to select on change in react jsreact select get value on change with valueselect handle change reactselect option onchange get value reactreact select on change no valuereact select get value on changechange select value react jsreact on select change 5creact js select on changehow to change option value reacthow to check when a value is change in select in js using reactrreact select onchange set valuereact select option changehow to set value of select on change in reatreact onchange select option valuereact select on change get valuereact select box on changehtml select on change reactreact select value and onchangeon change in option select reactjsx on select value change