I'm building a UI that updates the url when the slider is updated. Currently it's hammering the history API and I'm getting an error in firefox that states Too many calls to Location or History APIs within a short timeframe and the ui freezes. It would be nice to have access to the sub messages (especially DragEnd). All this requires is changing the Msg to Msg(..) in the module exposing statement.
The user would still need to account for the generalized message handling so the example would look something like this
update msg ({ percentageSlider, timeSlider } as model) =
case msg of
PercentageSliderMsg m ->
case m of
DragEnd _ ->
-- do whatever you need to do on drag end and return (Model, Cmd)
_ ->
let
updatedModel = RangeSlider.update m percentageSlider
in
( Model updatedModel timeSlider, Cmd.none )
I'm sure the above can be refactored.
I've already cloned, updated and tested this (manually) and will have a PR soon.
I'm building a UI that updates the url when the slider is updated. Currently it's hammering the history API and I'm getting an error in firefox that states
Too many calls to Location or History APIs within a short timeframeand the ui freezes. It would be nice to have access to the sub messages (especiallyDragEnd). All this requires is changing theMsgtoMsg(..)in the module exposing statement.The user would still need to account for the generalized message handling so the example would look something like this
I'm sure the above can be refactored.
I've already cloned, updated and tested this (manually) and will have a PR soon.