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: click event triggered twice leads to repeated execution of the router.go method #996

Closed
wants to merge 2 commits into from

Conversation

zonemeen
Copy link
Collaborator

@zonemeen zonemeen commented Jul 15, 2022

fix #995

@zonemeen zonemeen changed the title fix: repeated execution of the go method in createRouter fix: click on the event to repeat the router.go method Jul 15, 2022
@zonemeen zonemeen changed the title fix: click on the event to repeat the router.go method fix: clicking on the event twice leads to repeated execution of the router.go method Jul 15, 2022
@zonemeen zonemeen changed the title fix: clicking on the event twice leads to repeated execution of the router.go method fix: click event triggered twice leads to repeated execution of the router.go method Jul 15, 2022
event.preventDefault()
}

router.go(relativeHit)
Copy link
Member

@brc-dd brc-dd Jul 15, 2022

Choose a reason for hiding this comment

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

If we are removing these then there is no need to provide the onClick prop, there is nothing being done there except for this. If I am correct, then we can remove that safely as this part of the code handles all the links. Might need to discuss this first with others.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @brc-dd , have you discussed the solution yet?

@zonemeen
Copy link
Collaborator Author

Sry, this PR was accidentally closed by me😅

@brc-dd brc-dd reopened this Jul 18, 2022
@brc-dd brc-dd closed this in #1087 Jul 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
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.

Repeated execution of the router.go method when clicking on the jump link in the Algolia search box
2 participants