Fix WordForm and SearchBox not being able to enter words

This commit is contained in:
Robbie Antenesse 2018-03-09 11:02:00 -07:00
parent f296dacdad
commit 4c03b9c164
2 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ export class SearchBox extends Component {
this.searchBox = input;
}}
value={ this.state.searchTerm }
onChange={(event) => {
onInput={(event) => {
this.setState({ searchTerm: event.target.value.trim() }, () => this.search());
}} />
<span className='icon is-small is-left'>

View File

@ -109,7 +109,7 @@ export class WordForm extends Component {
<input className={ `input${(!this.state.nameIsValid) ? ' is-danger' : ''}` }
type='text' placeholder='Required'
value={ this.state.wordName }
onChange={(event) => {
onInput={(event) => {
this.setState({ wordName: event.target.value });
}} />
{(!this.state.nameIsValid)
@ -149,7 +149,7 @@ export class WordForm extends Component {
<input className={ `input${(!this.state.definitionIsValid) ? ' is-danger' : ''}` }
type='text' placeholder='Equivalent word(s)'
value={ this.state.wordDefinition }
onChange={(event) => {
onInput={(event) => {
this.setState({ wordDefinition: event.target.value })
}} />
{(!this.state.definitionIsValid)