Skip to content

Commit

Permalink
Generated by TRAVIS-CI b543058
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
michael-n-cooper and mcking65 committed Feb 28, 2020
1 parent a65a1a3 commit e6bdf94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/combobox/js/combobox-autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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;

Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2610,6 +2610,7 @@ <h4 id="examples-6">Examples<a class="self-link" aria-label="§" href="#examples
<li><a href="examples/listbox/listbox-scrollable.html">Scrollable Listbox Example</a>: Single-select listbox that scrolls to reveal more options, similar to HTML <code>select</code> with <code>size</code> attribute greater than one.</li>
<li><a href="examples/listbox/listbox-collapsible.html">Collapsible Dropdown Listbox Example</a>: Single-select collapsible listbox that expands when activated, similar to HTML <code>select</code> with the attribute <code>size="1"</code>.</li>
<li><a href="examples/listbox/listbox-rearrangeable.html">Example Listboxes with Rearrangeable Options</a>: Examples of both single-select and multi-select listboxes with accompanying toolbars where options can be added, moved, and removed.</li>
<li><a href="examples/listbox/listbox-grouped.html">Listbox Example with Grouped Options</a>: Single-select listbox with grouped options, similar to an HTML <code>select</code> with <code>optgroup</code> children.</li>
</ul>
</section>

Expand Down

0 comments on commit e6bdf94

Please sign in to comment.