Skip to content

Commit 675633e

Browse files
committed
Update selectedpoints property in response to selection events
1 parent 211af3f commit 675633e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plotly/basedatatypes.py

+7
Original file line numberDiff line numberDiff line change
@@ -4117,6 +4117,13 @@ def _dispatch_on_selection(self,
41174117
"""
41184118
Dispatch points and selector info to selection callbacks
41194119
"""
4120+
if 'selectedpoints' in self:
4121+
# Update the selectedpoints property, which will notify all views
4122+
# of the selection change. This is a special case because no
4123+
# restyle event is emitted by plotly.js on selection events
4124+
# even though these events update the selectedpoints property.
4125+
self.selectedpoints = points.point_inds
4126+
41204127
for callback in self._select_callbacks:
41214128
callback(self, points, selector)
41224129

0 commit comments

Comments
 (0)