workingconcept / range-slider-craft-plugin

Field for defining ranges with a nice UI.
MIT License
1 stars 2 forks source link

From value overrides user input (can't set a default value) #1

Closed ushapax closed 5 years ago

ushapax commented 5 years ago

So it looks like Ion uses the from data attribute as a default value for the single slider. Works for new entries. However, when editing existing entries the range slider is always initialized to the from value instead of the input value. Maybe a bug with Ion?

I got this to work with a check and reset of the input value in the helper js function.

mattstein commented 5 years ago

Thanks @ushapax! Would you mind submitting a PR for that? This repo's in a weird place as it's just a partially completed port of a Craft 2 plugin (that I made to quickly get another project to Craft 3). I should probably point this out somewhere...

mattstein commented 5 years ago

Merged PR, thank you kindly.