developergovindgupta / multi-range-slider-react-ts

single component to select range value from slider with no other dependency.
14 stars 9 forks source link

Left Thumb Stopping at `MaxVal - Step` Value #5

Closed sameera-insighture closed 7 months ago

sameera-insighture commented 7 months ago

Issue

I think it is better that fixing or updating the Left Thumb stopping at maxValue - step. Im having a scenario that minValue should same with maxVlaue when the sliders change. image

https://github.com/developergovindgupta/multi-range-slider-react-ts/assets/150607596/dad8ba79-17bc-4b73-9237-cf59b23ac228

Suggestion

we can update step prop to have value 0 and if the value is 0 we can update the code as follows

current code else if (val > _maxValue - step) { val = _maxValue - step; }

updated code else if (val > _maxValue) { val = _maxValue ; }

developergovindgupta commented 7 months ago

Thanks for reporting the issue. and update version 2.0.6

Fixed Issue of negative step value : Negative step value does not make any sense. so I make it absolute value

On Thu, 16 Nov 2023 at 23:18, Sameera Liyanage @.***> wrote:

Issue

I think it is better that fixing or updating the Left Thumb stopping at maxValue - step. Im having a scenario that minValue should same with maxVlaue when the sliders change. Suggestion

we can update step prop to have value 0 and if the value is 0 we can update the code as follows

current code else if (val > _maxValue - step) { val = _maxValue - step; }

updated code else if (val > _maxValue) { val = _maxValue ; }

— Reply to this email directly, view it on GitHub https://github.com/developergovindgupta/multi-range-slider-react-ts/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXYHBHX2P7RPA3EVBUF4T3YEZGWLAVCNFSM6AAAAAA7ORTSASVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TONBSG43DMOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Govind Prasad Gupta Mob. 7841849768, 9335057042

developergovindgupta commented 7 months ago

Fixes your requirement with introducing new property "canMinMaxValueSame" in version 2.0.7

canMinMaxValueSame Boolean false If true then user can select both min and max same value otherwise have difference of step value Now users can select min value and max value both the same.

On Mon, 27 Nov 2023 at 14:30, Govind Prasad Gupta < @.***> wrote:

Thanks for reporting the issue. and update version 2.0.6

Fixed Issue of negative step value : Negative step value does not make any sense. so I make it absolute value

On Thu, 16 Nov 2023 at 23:18, Sameera Liyanage @.***> wrote:

Issue

I think it is better that fixing or updating the Left Thumb stopping at maxValue - step. Im having a scenario that minValue should same with maxVlaue when the sliders change. Suggestion

we can update step prop to have value 0 and if the value is 0 we can update the code as follows

current code else if (val > _maxValue - step) { val = _maxValue - step; }

updated code else if (val > _maxValue) { val = _maxValue ; }

— Reply to this email directly, view it on GitHub https://github.com/developergovindgupta/multi-range-slider-react-ts/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXYHBHX2P7RPA3EVBUF4T3YEZGWLAVCNFSM6AAAAAA7ORTSASVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TONBSG43DMOA . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>

-- Govind Prasad Gupta Mob. 7841849768, 9335057042

-- Govind Prasad Gupta Mob. 7841849768, 9335057042

developergovindgupta commented 7 months ago

image

sameera-insighture commented 7 months ago

Nice @developergovindgupta