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

fix(sidebar-filter): avoid duplicate focus events #9106

Closed

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Jun 16, 2023

Summary

(MP-482)

Problem

We measure how many users click into the sidebar filter input, but unfortunately each keypress also triggers the event.

Solution

Distinguish the activation change.


How did you test this change?

Added a console.log() call to the useEffect()'s inner block to verify it's only called when (re-)activating the sidebar filter.

@caugner caugner requested a review from LeoMcA June 16, 2023 16:29
LeoMcA added a commit that referenced this pull request Jun 16, 2023
this causes any useEffects depending on it to fire on every render

should fix the underlying problem in #9106
@caugner
Copy link
Contributor Author

caugner commented Jun 16, 2023

Closing in favor of #9108.

@caugner caugner closed this Jun 16, 2023
@caugner caugner deleted the fix-sidebar-filter-avoid-duplicate-focus-events branch June 19, 2023 17:54
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.

1 participant