Skip to content

Commit 0426134

Browse files
committed
Revert "fix: issue-4301"
This reverts commit fef90c5.
1 parent fef90c5 commit 0426134

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

src/components/TeamManagement/AutocompleteInput.jsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ class AutocompleteInput extends React.Component {
1616
const {
1717
placeholder,
1818
selectedMembers,
19-
disabled,
20-
inputValue
19+
disabled
2120
} = this.props
2221

2322
return (
@@ -28,7 +27,6 @@ class AutocompleteInput extends React.Component {
2827
showDropdownIndicator={false}
2928
createOption
3029
placeholder={placeholder}
31-
inputValue={inputValue}
3230
value={selectedMembers}
3331
onInputChange={this.props.onInputChange}
3432
onChange={this.props.onUpdate}
@@ -43,7 +41,6 @@ class AutocompleteInput extends React.Component {
4341
AutocompleteInput.defaultProps = {
4442
placeholder: 'Enter one or more user handles',
4543
selectedMembers: [],
46-
inputValue: '',
4744
disabled: false
4845
}
4946

@@ -73,11 +70,6 @@ AutocompleteInput.propTypes = {
7370
* The flag if component is disabled
7471
*/
7572
disabled: PropTypes.bool,
76-
77-
/**
78-
* The inputValue for the input field
79-
*/
80-
inputValue: PropTypes.string,
8173
}
8274

8375
export default AutocompleteInput

src/components/TeamManagement/AutocompleteInputContainer.jsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)