Commit 3777ab82 authored by Technoboy10's avatar Technoboy10

make fix simpler by using value instead of defaultValue

parent 4a610296
......@@ -75,11 +75,7 @@ var Search = injectIntl(React.createClass({
}.bind(this));
},
onSearchSubmit: function (formData) {
if (!formData.q){
window.location.href = '/search/projects?q=' + this.props.searchTerm;
} else {
window.location.href = '/search/projects?q=' + formData.q;
}
window.location.href = '/search/projects?q=' + formData.q;
},
getTab: function (type) {
var term = this.props.searchTerm.split(' ').join('+');
......@@ -114,7 +110,7 @@ var Search = injectIntl(React.createClass({
<Input type="text"
aria-label={formatMessage({id: 'general.search'})}
placeholder={formatMessage({id: 'general.search'})}
defaultValue={decodeURI(this.props.searchTerm)}
value={decodeURI(this.props.searchTerm)}
name="q" />
</Form>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment