Skip to content

Commit dbcf2be

Browse files
alvitaembbnux
authored andcommitted
It should not auto-select the first matching recorde when press semicolon and comma on keyboard (#185)
1 parent 59ab0e1 commit dbcf2be

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/components/RecipientsInput/index.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -138,22 +138,10 @@ class RecipientsInput extends Component {
138138
if (this.props.value.length === 0) {
139139
return;
140140
}
141-
const relatedContactList = this.props.value.length >= 3 ?
142-
this.props.searchContactList : [];
143-
const currentSelected
144-
= relatedContactList[this.state.selectedContactIndex];
145-
if (currentSelected) {
146-
this.props.addToRecipients({
147-
name: currentSelected.name,
148-
phoneNumber: currentSelected.phoneNumber,
149-
});
150-
} else {
151-
this.props.addToRecipients({
152-
name: this.props.value.replace(',', ''),
153-
phoneNumber: this.props.value.replace(',', ''),
154-
});
155-
this.props.onClean();
156-
}
141+
this.props.addToRecipients({
142+
name: this.props.value.replace(',', ''),
143+
phoneNumber: this.props.value.replace(',', ''),
144+
});
157145
this.props.onClean();
158146
}
159147
};

0 commit comments

Comments
 (0)