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

Scope debouncing to the event target #16

Merged
merged 1 commit into from
Mar 16, 2024
Merged

Scope debouncing to the event target #16

merged 1 commit into from
Mar 16, 2024

Conversation

x4d3
Copy link
Contributor

@x4d3 x4d3 commented Jan 14, 2024

If 2 elements of the same type occurs on the same time, one may be ignored as both the event will be dispatch through the same channel. This makes sure that they can't share the same timeoutId if they are pointing to different targets.

Fix #15

I decided to duplicate debounce to debounceEvent to keep the backward compatibility.

@x4d3
Copy link
Contributor Author

x4d3 commented Jan 14, 2024

I would argue that the errors reported by "Codacy Static Code Analysis" are not applicable for this codebase.
Also they are other examples of direct assigntion to object in the code.(for example initializedEvents)

@hopsoft
Copy link
Owner

hopsoft commented Feb 12, 2024

Looks like we have some conflicts. Happy to dive into this if you can resolve those.

@x4d3
Copy link
Contributor Author

x4d3 commented Mar 2, 2024

Dear @hopsoft
Sorry for taking so long to reply, I didn't see your message.
I've fixed the merge conflicts.

If 2 elements of the same type occurs on the same time, one may be ignored as both the event will be dispatch through the same channel.
This makes sure that they can't share the same timeoutId if they are pointing to different targets.
@hopsoft hopsoft merged commit b49c67c into hopsoft:main Mar 16, 2024
1 check failed
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.

Events are ignored if they are triggered at the same time and from the same type
2 participants