Open fohrloop opened 2 months ago
I think what is happening is the change to _start_input.value
in _sync_widgets
is updating self.value
in _sync_params
before _end_input
has been updated.
@param.depends("value", "width", watch=True)
def _sync_widgets(self):
self._start_input.name = self.name
with (
param.discard_events(self._start_input),
param.discard_events(self._end_input)
):
self._start_input.value = self.value[0]
self._end_input.value = self.value[1]
self._sync_params()
self._start_input.width = self.width // 2
self._end_input.width = self.width // 2
ALL software version info
Description of expected behavior and the observed behavior
Following the example in Combine Existing Components. The EditableRange.value does not work as expected.
.value
as in other widgets, although the name of the parent class isViewable
(does it mean it is uneditable? Or just that it it's possible to view this inside a Jupyter Notebook or dashboard app?). Nothing in the docs say that it is not editable, and the cross-callbacks (_sync_widgets
,_sync_params
) might make you think the value it is.Complete, minimal, self-contained example code that reproduces the issue
This one is copied from the docs (Combine Existing Components).
Stack traceback and/or browser JavaScript console output
This is what you get from the test:
Screenshots or screencasts of the bug in action