I’m wondering how to use the throttled value of a widget with a parameterized class,
or specify the throttling period when
DateRange is created declaratively.
date_range = param.DateRange(...)
date_range does not accept a
callback_throttle keyword like the
DateRange widget does.
Furthermore, how should I use
@pn.depends(...) decorator for a function that should respond to the throttled value?
There’s currently not a great approach here but there’s already an issue about this you could track (or contribute to): https://github.com/holoviz/panel/issues/1259
Thanks @philippjfr, and sorry for the delayed reply. I think I’ll just use explicit
widget instances for now.
I’m having the exact same issue…
@JoyMonteiro Would you mind sharing your workaround for this?
@philippjfr In the Issue you mention, it seems to me that a solution for
panel.depends is suggested, but will that also help for the
@marfel sorry for the delayed reply.
I essentially created a class attribute initialized to None. In the object init, I assign an
the word cloud app
wordcloud_date_range = None
self.wordcloud_date_range = pnw.DateRangeSlider(
name='Choose time period',
and then use this in the decorator
Ahh, I see. So despite this being a parameterized class, you’re not using the
param magic but
panel's dependency handling. And why not? Thank you!