-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
For a long time many users have had a problem where they want one event for "total range change" (e.g. due to a pan or zoom) but as of now, can only set up on_change handlers on all the range start/end properties individually. This leads to triggering more callbacks than desired, and understandable attempts to implement fragile and ad-hoc debouncing schemes.
In the past there was not a good technical path to fixing this because we only had read/write properties available to trigger callbacks. Now that there are FnF events, I think a better solution is possible. Things that normally set multiple range values "all at once" (e.g. pan or zoom tools) could also emit a new RangesUpdate event after all the range values are updated. Then user code can register for a single RangesUpdate event, and look up all the updated values at once (alternatively, the event itself could transmit default range values).
Another option at this point could be a readonly property but I think an event is preferable.
cc @philippjfr @AjayThorve I think this is of interest to Panel and cuxfilter.