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

Make it possible to override debounce settings for @DomEvent listeners #4017

Closed
Legioth opened this issue Apr 26, 2018 · 0 comments
Closed

Comments

@Legioth
Copy link
Member

Legioth commented Apr 26, 2018

While it is possible to have one declaratively defined debounce setting for @DomEvent, there is no easy way of making a component API that allows users to customize the debounce settings for individual listeners.

One challenge with implementing something like this is that the current implementation only adds one listener to the Element even if multiple component-level listeners are registered. A single element listener only supports having one debounce setting. Even if multiple settings would be possible, there would also be a challenge with routing each element event to the correct component listeners.

Another challenge lies in the way the same addListener method is also used for listeners that aren't annotated with @DomEvent, for which debounce settings wouldn't make any sense.

It should also be considered how to make it clear that the debounce settings are only effective for events originated from the client, but not in cases where the same event can also be fired from the server (e.g. value change events triggered through server-side setValue methods).

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

No branches or pull requests

3 participants