ipyvuetify icon indicating copy to clipboard operation
ipyvuetify copied to clipboard

Disable continous updates of widgets

Open JovanVeljanoski opened this issue 4 years ago • 1 comments

Hi,

First of all great project, excellent work!

A small question: is it there a keyword somewhere in the ipyvuetify widgets to only apply the changes of the widget on the release of the mouse. So for instance the Slider will only update after the mouse is released, and not while one is sliding the thing around. In the ipywidgets library some widgets have the continuous_update=False keyword.

Or perhaps there is some way to replicate this behaviour?

Cheers!

JovanVeljanoski avatar Jul 19 '19 12:07 JovanVeljanoski

Thanks!

Ipyvuetify does not support the continuous_update property. It may be a nice feature to add in the future.

In the specific case of the Slider you can use the event end. It will fire when the user releases the slider.

def slider_released(widget, *args):
    print(f'value: {widget.v_model}')
    
slider = v.Slider(v_model=5)
slider.on_event('end', slider_released)
slider

I hope this will help.

mariobuikhuizen avatar Jul 19 '19 12:07 mariobuikhuizen