Parameterized class - Update on mouse up?

I have a parameterized class that is going to create a variable number of parameters, depending on what the user is going to pass in. Is there a way to execute the update only when the mouse up event fires?

Let’s consider the following example:

import param
import panel as pn

class MyClass(param.Parameterized):
    def __init__(self, parameters, **kwargs):
        super().__init__(**kwargs)
        self.mapping = {}
        
        # create and attach the params to the class
        for i, (k, v) in enumerate(parameters.items()):
            # TODO: using a private method: not the smartest thing to do
            self.param._add_parameter("dyn_param_{}".format(i), v)
            self.mapping[k] = "dyn_param_{}".format(i)
    
    def update(self):
        out = []
        for k, v in self.mapping.items():
            out.append("{} = {}".format(k, getattr(self, v)))
        return ", ".join(out)
    
    def show(self):
        return pn.Column(self.param, self.update)

m = MyClass({
    "a": param.Integer(default=300, softbounds=(100, 500), label="a"),
    "b": param.Number(default=1, softbounds=(0.4, 15), label="b"),
})
m.show()

Here, I passed in two parameters, which will be rendered as sliders. Whenever I move a slider, the event will start an update. In this simple case, the output shows the values of the sliders as I moved them.

However, I would like the (automatically) generated sliders (or any other control) to only start the update when the mouse up event occurs. Is it even possible?

Related to:

But not sure how to implement in a param class

https://panel.holoviz.org/reference/panes/Param.html#disabling-continuous-updates-for-slider-widgets

Thank you!!! It’s a little bit of a PITA as an overall approach for my dynamic use case, but it worked.

Maybe you can submit an issue on Github and request for another design e.g.

self.with_throttled_enabled.throttled = True

because I find param hard to use too (I usually just define my own widgets and link them one by one)

Yep, I think I will propose a class attribute for parameterized classes.