Skip to content

Commit

Permalink
Merge pull request #5619 from carldenigma/master
Browse files Browse the repository at this point in the history
#5618 - Updated AutoComplete to allow form submission using return
  • Loading branch information
tugcekucukoglu authored Apr 19, 2024
2 parents d1a26a2 + f57a90e commit f1e3ded
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/lib/autocomplete/AutoComplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -617,16 +617,14 @@ export default {
onEnterKey(event) {
if (!this.overlayVisible) {
this.focusedOptionIndex = -1; // reset
this.onArrowDownKey(event);
} else {
if (this.focusedOptionIndex !== -1) {
this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);
event.preventDefault();
}
this.hide();
}
event.preventDefault();
},
onEscapeKey(event) {
this.overlayVisible && this.hide(true);
Expand Down

0 comments on commit f1e3ded

Please sign in to comment.