When subscribed to clrRange fromControl's valueChanges it fires an event twice.
https://stackblitz.com/edit/clarity-v3-dark-theme-timeline-demo-fbmge8?file=src/app/app.component.ts
Steps to reproduce the behavior:
On valueChanges the clrRange input event should fire once.
App
Device:
Hi @nkolchakov!
Forms are part of Angular and we are not adding anything on top of angular forms.
You can use pipes to handle this situation - pipe(distinctUntilChanged())
this.formGroup.get("clrRange").valueChanges.pipe(distinctUntilChanged()).subscribe((newValue: any) => {
console.log('trigger clrRange - ', newValue);
});
Hope that helps!
To be more clear, this happens to a range input regardless if you use Clarity or not. The change event fires on changing of the value, and when you release the mouse.
Hi there 馃憢, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.
Most helpful comment
To be more clear, this happens to a range input regardless if you use Clarity or not. The change event fires on changing of the value, and when you release the mouse.