Guest User

Untitled

a guest
Mar 20th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. import React from 'react';
  2. import ReactDOM from 'react-dom';
  3. import axios from 'axios';
  4.  
  5. class SearchForm extends React.Component {
  6.  
  7. constructor(props) {
  8. super(props)
  9.  
  10. this.state = {
  11. position: '',
  12. area: '',
  13. period: '',
  14. experience: {
  15. type: Array,
  16. default: () => []
  17. }
  18. }
  19. this.handlePeriodChange = this.handlePeriodChange.bind(this);
  20. }
  21.  
  22.  
  23. handlePeriodChange(e) {
  24. this.setState({
  25. [e.target.name]: e.target.value
  26. });
  27. }
  28.  
  29. render() {
  30. return ( <
  31. form className = 'form search-form'
  32. onSubmit = {
  33. this.handleSubmit
  34. } >
  35. <
  36. div className = "form-row" >
  37.  
  38. <
  39. div className = "form-group col-md-2" >
  40. <
  41. label htmlFor = "period" > Period *< /label> <
  42. select className = "form-control"
  43. name = "period"
  44. id = "period"
  45. onChange = {
  46. this.handlePeriodChange
  47. }
  48. value = {
  49. this.state.period
  50. } >
  51. <
  52. option value = "1" > 1 < /option> <
  53. option value = "3" > 3 < /option> <
  54. option value = "7" > 7 < /option> <
  55. option value = "30" > 30 < /option> < /
  56. select > <
  57. /div> < /
  58. div >
  59.  
  60.  
  61. <
  62. div className = "form-row" >
  63. <
  64. div className = "form-group col-md-12 pt-3" >
  65. <
  66. input id = 'form-button'
  67. className = 'btn btn-primary'
  68. type = 'submit'
  69. placeholder = 'Send' / >
  70. <
  71. /div> < /
  72. div > <
  73. /form>
  74. )
  75. }
  76. }
  77.  
  78. export {
  79. SearchForm
  80. }
Add Comment
Please, Sign In to add comment