File tree Expand file tree Collapse file tree
SchoolLookup/__snapshots__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,13 +92,13 @@ exports[`renders correctly 1`] = `
9292 aria-describedby = " school-lookup"
9393 autoComplete = " off"
9494 className = " c5"
95+ defaultValue = " "
9596 id = " school-lookup"
9697 name = " school-lookup"
9798 onChange = { [Function ]}
9899 placeholder = " Type to start search"
99100 required = { false }
100101 type = " text"
101- value = " "
102102 />
103103 </div >
104104
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ const Typeahead = React.forwardRef(
2424 } ,
2525 ref
2626 ) => {
27- const [ value , setValue ] = useState ( '' ) ;
2827 const [ options , setOptions ] = useState ( [ ] ) ;
2928 const [ errorMsg , setErrorMsg ] = useState ( '' ) ;
3029
@@ -62,13 +61,11 @@ const Typeahead = React.forwardRef(
6261
6362 return (
6463 < TextInputWithDropdown
65- value = { value }
64+ defaultValue = ""
6665 options = { optionParser ? options . map ( optionParser ) : options }
6766 errorMsg = { errorMsg }
6867 onChange = { e => {
6968 const newValue = e . currentTarget . value ;
70- setValue ( newValue ) ;
71-
7269 debouncedHandleChange ( newValue ) ;
7370 } }
7471 onSelect = { ( parsedOption , optionIndex ) => {
@@ -81,7 +78,6 @@ const Typeahead = React.forwardRef(
8178 // reset
8279 setOptions ( [ ] ) ;
8380 setErrorMsg ( '' ) ;
84- setValue ( '' ) ;
8581 } }
8682 id = { id }
8783 label = { label }
Original file line number Diff line number Diff line change @@ -92,13 +92,13 @@ exports[`renders correctly 1`] = `
9292 aria-describedby = " typeahead-test"
9393 autoComplete = " off"
9494 className = " c5"
95+ defaultValue = " "
9596 id = " typeahead-test"
9697 name = " q"
9798 onChange = { [Function ]}
9899 placeholder = " Type to start searching..."
99100 required = { false }
100101 type = " text"
101- value = " "
102102 />
103103 </div >
104104
You can’t perform that action at this time.
0 commit comments