From b543058379f8180be0c76fca7b52f7fc2ec41ad8 Mon Sep 17 00:00:00 2001 From: Jon Gunderson Date: Fri, 28 Feb 2020 16:51:54 -0500 Subject: [PATCH] Combobox with list and both autocomplete: Fix issue with listbox not updating (pull #1335) * fixed #1332 by adding call to filterOptions after updating filter * added update filterOptions when ever backspace is pressed Co-authored-by: Matt King --- examples/combobox/js/combobox-autocomplete.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/combobox/js/combobox-autocomplete.js b/examples/combobox/js/combobox-autocomplete.js index ebf61dd2f4..8bae873d66 100644 --- a/examples/combobox/js/combobox-autocomplete.js +++ b/examples/combobox/js/combobox-autocomplete.js @@ -391,6 +391,7 @@ ComboboxAutocomplete.prototype.handleComboboxKeyUp = function (event) { if (this.comboboxNode.value.length < this.filter.length) { this.filter = this.comboboxNode.value; this.option = null; + this.filterOptions() } if (event.key === "Escape" || event.key === "Esc") { @@ -402,7 +403,9 @@ ComboboxAutocomplete.prototype.handleComboboxKeyUp = function (event) { case "Backspace": this.setVisualFocusCombobox(); this.setCurrentOptionStyle(false); + this.filter = this.comboboxNode.value; this.option = null; + this.filterOptions() flag = true; break;