Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Conversation

cmcculloh-kr
Copy link

closes #1710

Allows the user to provide their own filter as an option if desired (or just use the basic built-in one).

By default, could be styled to support different displays for partial or full matches if desired.

The keyboard navigation also increases accessibility for the control.

Also fixes until-know-uncaught bug where $(a).text() contents may contain whitespace due to html formatting, and therefore "One " and "One" would not match (now calling .trim() on $(a).text())

Default filter:

  • Styles exact matches as .text-success
  • Styles matches that begin with input text as .text-info
  • Hides non-matches
  • Displays (non-selectable) "No Matches" when no matches are found

Combobox now:

  • Allows navigation of options with arrow keys
  • Changes selection to highlighted option on enter
  • Clears combobox on esc
  • Optionally fires filter on non-navigational keystrokes
  • Fires change events on selection change through navigationally selected selections

combobox

autoResizeMenu: true,
filterOnKeypress: false,
showOptionsOnKeypress: false,
filter: function filter(list, predicate, self) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a space between filter and (

@kevinparkerson
Copy link
Contributor

only some minor formatting changes needed, once those are done this is good to go! 👍

@cmcculloh-kr cmcculloh-kr modified the milestones: 3.14.2, Roadmap Feb 23, 2016
@kevinparkerson
Copy link
Contributor

Ah yes, those unit tests are nice! Good work! 👍

kevinparkerson pushed a commit that referenced this pull request Feb 23, 2016
…in-combobox-for-typeahead-supportfuelux

adds filter option to combobox and keyboard nav for dropdown
@kevinparkerson kevinparkerson merged commit eb062a2 into ExactTarget:master Feb 23, 2016
@cmcculloh-kr cmcculloh-kr deleted the GH1710---expose-onkeyup-in-combobox-for-typeahead-supportfuelux branch August 25, 2016 18:39
@cmcculloh-kr cmcculloh-kr modified the milestones: Roadmap, 3.15.7 Sep 12, 2016
@cmcculloh-kr cmcculloh-kr added this to the 3.14.3 milestone Nov 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expose onkeyup in combobox for typeahead support
2 participants