Fomantic-ui: Prevent slider from swapping handles

Created on 18 Sep 2019  路  6Comments  路  Source: fomantic/Fomantic-UI

Feature Request

Slider should have option to block "max handle" when trying to go below "min handle"

Description

The slider handles can be reversed, so if i drag max handle to the left of min handle, values get inverted.

There should be option in settings to prevent this.

Example

ui-slider-bug

lanjavascript typfeat

Most helpful comment

This setting should be called something like preventCrossover and I think it should be enabled by default since this is unexpected.

All 6 comments

Just noticed that in examples this feature is achieved by

 if (firstVal > secondVal) {
          $('#range-slider-input-1').val('|' + firstVal + " - " + secondVal + '| = ' + range);
        } else {
          $('#range-slider-input-1').val('|' + secondVal + " - " + firstVal + '| = ' + range);
        }

Maybe it would be clearer to make it a setting

This setting should be called something like preventCrossover and I think it should be enabled by default since this is unexpected.

I would like to work on this

This seems to be too difficult for me :( I give up. Someone else please take it up.

I'll look into this.

Implemented by #1082

Was this page helpful?
0 / 5 - 0 ratings