@@ -11,10 +11,6 @@ class AutocompleteInputContainer extends React.Component {
1111 constructor ( props ) {
1212 super ( props )
1313 this . debounceTimer = null
14- this . state = {
15- // field input value
16- inputValue : ''
17- }
1814
1915 this . clearUserSuggestions = this . clearUserSuggestions . bind ( this )
2016 }
@@ -31,11 +27,7 @@ class AutocompleteInputContainer extends React.Component {
3127 }
3228 }
3329
34- onInputChange ( inputValue , reason ) {
35- // for keeping inputValue
36- if ( reason . action === 'input-blur' || reason . action === 'menu-close' ) {
37- return
38- }
30+ onInputChange ( inputValue ) {
3931 const indexOfSpace = inputValue . indexOf ( ' ' )
4032 const indexOfSemiColon = inputValue . indexOf ( ';' )
4133
@@ -44,7 +36,6 @@ class AutocompleteInputContainer extends React.Component {
4436 return ''
4537 }
4638
47- this . setState ( { inputValue} )
4839 if ( indexOfSpace >= 1 || indexOfSemiColon >= 1 ) {
4940 inputValue = inputValue . substring ( 0 , inputValue . length - 1 )
5041 this . onUpdate ( [ ...this . props . selectedMembers , { label : inputValue , value : inputValue } ] )
@@ -78,11 +69,9 @@ class AutocompleteInputContainer extends React.Component {
7869 render ( ) {
7970
8071 const { placeholder, currentUser, selectedMembers, disabled } = this . props
81- const { inputValue} = this . state
8272
8373 return (
8474 < AutocompleteInput
85- inputValue = { inputValue }
8675 placeholder = { placeholder ? placeholder :'' }
8776 onInputChange = { this . onInputChange . bind ( this ) }
8877 onUpdate = { this . onUpdate . bind ( this ) }
0 commit comments