IgniteUI / igniteui-react

High-Performance Data Grid and High-Volume Data Charts
Other
6 stars 1 forks source link

Range slider change event emits wrong values #72

Open wnvko opened 6 months ago

wnvko commented 6 months ago

Description

I am trying to update local variable via change event of the range slider component.

Steps to reproduce

Use code like this:

const [range, setRange] = useState<IgrRangeSliderValue | undefined>();
...
<IgrRangeSlider lower={range?.lower} upper={range?.upper} change={(_s, e) => setRange(e.detail)}></IgrRangeSlider>
<p>Range is {range?.lower} - {range?.upper}</p>

Result

On each change the e.detail contains {lower: 0, upper: 0}. Here is the result: image

Expected result

change event should emit correct values in its detail.