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

Restore glossary search on typeahead select. #141

Merged
merged 2 commits into from
May 7, 2015

Conversation

jmcarp
Copy link
Contributor

@jmcarp jmcarp commented May 6, 2015

When the user selects an option in the glossary typeahead, the
associated text should appear below. A previous bug fix prevented this
behavior, such that selecting an option did not show the glossary text.

This also uses the typeahead:selected custom event, which will hopefully be more robust and easier to understand than listening for particular keypress buttons. @msecret could you verify that the bug you fixed in d013e08 is still fixed with this patch? I think it is, but I'm not sure exactly how the glossary was behaving before you fixed it.

When the user selects an option in the glossary typeahead, the
associated text should appear below. A previous bug fix prevented this
behavior, such that selecting an option did not show the glossary text.
@noahmanger
Copy link
Contributor

I totally just did this randomly here 09664f3 . Happy to go with either method. But we'll want to update this line here: https://github.com/jmcarp/openFEC-web-app/blob/feature/fix-glossary-typeahead/static/js/modules/typeahead.js#L187

@noahmanger
Copy link
Contributor

I like you're approach. Can you just change the main typeahead to be bound to the correct search bar and remove the if ( datasetName === 'Definitions' )?

@jmcarp
Copy link
Contributor Author

jmcarp commented May 7, 2015

Updated the PR @noahmanger. I moved both typeahead:selected listeners into separate functions to (hopefully) make it clearer what each typeahead is listening for. Sorry about the conflict!

noahmanger pushed a commit that referenced this pull request May 7, 2015
Restore glossary search on typeahead select.
@noahmanger noahmanger merged commit 2b45328 into fecgov:develop May 7, 2015
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