I am not sure if the slider component has become an official component in Anvil. Regardless, it would be awesome to have a few feature upgrades:
-
Click events. The “Change” method works okay, but if there is a server function that runs every time the slider is changed, as the user moves the slider the server function gets called dozens of times. It would be much better to have an “Unclick” event, whereby the function would run whenever the user moved the slider and released the mouse at a given slider location, allowing the function to only run once on a discrete slider move.
-
Write back capability for data binding. I tried to bind the slider.level value to an integer value in a data table but didn’t have any luck with it. It would be great to have write back capability for keeping track of user settings, etc.
-
Layout options to allow adaptive spacing like in other widgets
-
Ability to change color of slider thumb, trough, etc.