Skip to content

Commit

Permalink
Fixed an issue where the autocomplete on the country/region field wou…
Browse files Browse the repository at this point in the history
…ld show the Id instead of the name when using the arrow keys to navigate the autocomplete suggestions
  • Loading branch information
joshgk00 authored and bdukes committed Oct 15, 2020
1 parent 66b5eda commit 12bfd6d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,13 @@ function setupCountryAutoComplete() {
} else {
clearCountryValue(this);
}
}
},
focus: function (event, ui) {
event.preventDefault();
this.value = ui.item.name;
$(this).attr('data-value', ui.item.id);
$(this).attr('data-text', ui.item.name);
}
});
$('input[data-editor="DnnCountryAutocompleteControl"]').change(function () {
if ($(this).val().length < 2) {
Expand Down

0 comments on commit 12bfd6d

Please sign in to comment.