* Updates the input value on item select. * @param item The item that is on select
(item: IInputSuggestionItem)
| 1585 | * @param item The item that is on select |
| 1586 | */ |
| 1587 | updateValueOnSelect(item: IInputSuggestionItem) { |
| 1588 | const itemValue = this._isGroupItem(item) ? this.valueBeforeSelectionStart : (item as IInputSuggestionItemSelectable).text; |
| 1589 | |
| 1590 | this.value = itemValue || ""; |
| 1591 | this._performTextSelection = true; |
| 1592 | |
| 1593 | // Update the matched item when navigating with arrows to preserve correct case on Enter |
| 1594 | if (!this._isGroupItem(item)) { |
| 1595 | this._matchedSuggestionItem = item as IInputSuggestionItemSelectable; |
| 1596 | } |
| 1597 | } |
| 1598 | |
| 1599 | fireEventByAction(action: INPUT_ACTIONS, e: InputEvent) { |
| 1600 | const valueBeforeInput = this.value; |
no test coverage detected