Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Typeahead #15

Merged
merged 12 commits into from
Jan 5, 2015
Merged

Typeahead #15

merged 12 commits into from
Jan 5, 2015

Conversation

noahmanger
Copy link
Contributor

Adds typeahead support on all search fields using the Twitter Typeahead library.

function filterCandidates(result) {
// Label House, President, Senate
var officeFull;
switch(result.elections[0].office_sought) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be a little bit nicer if we could map these values instead of using a switch statement. Something like:

var officeMap = {
  'H': 'House of Representatives'
  // and so on
}

officeFull = officeMap[result.elections[0].office_sought]

@theresaanna
Copy link
Contributor

👍

theresaanna added a commit that referenced this pull request Jan 5, 2015
@theresaanna theresaanna merged commit a51f618 into master Jan 5, 2015
@noahmanger noahmanger deleted the typeahead branch January 28, 2015 23:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants