Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate result event emissions (#99) #218

Merged
merged 3 commits into from
Mar 19, 2019

Conversation

scottsfarley93
Copy link

@scottsfarley93 scottsfarley93 commented Mar 18, 2019

This PR addresses the bug reported in #99 by keeping a state variable indicating the last selected feature.

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • update CHANGELOG.md with changes under master heading before merging

\cc @katydecorah @yuletide

@scottsfarley93 scottsfarley93 added this to the v4.0.0 milestone Mar 18, 2019
Copy link
Contributor

@katydecorah katydecorah left a comment

Choose a reason for hiding this comment

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

This approach makes sense! I left a small comment

lib/index.js Outdated Show resolved Hide resolved
@scottsfarley93 scottsfarley93 merged commit 1c44b72 into version4 Mar 19, 2019
@andrewharvey
Copy link
Collaborator

I must admit, this is an ingenious workaround for the underlying bug in suggestions. 😉 Certainly an improvement over the status quo.

There is a corner case where you re-select the same result and the result event is skipped, but I think that's too minor and arguably shouldn't re-fire anyway, that it's okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants