vaadin / flow-components

Java counterpart of Vaadin Web Components
100 stars 66 forks source link

Add possibility to reduce chatter on axis extreme change events #1367

Open johannesh2 opened 6 years ago

johannesh2 commented 6 years ago

Element#addEventListener returns a DomListenerRegistration which has a debounce method. Chart#addListener should also allow to reduce chatter on axis extreme change events.

oluwasayo commented 6 years ago

Internal: related conversation on Flow.

oluwasayo commented 6 years ago

Component-level API for customizing DOM event registrations has been implemented in Flow. This should allow code like

ComponentUtil.addListener(chart, MyEvent.class, 
    this::performAction, r -> r.debounce(interval));

See https://github.com/vaadin/flow/pull/4445