-
-
Notifications
You must be signed in to change notification settings - Fork 407
fix: setting selection_expr
programmatically
#6689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
selection_expr
programmatically
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6689 +/- ##
==========================================
+ Coverage 89.02% 89.07% +0.05%
==========================================
Files 329 330 +1
Lines 70389 70524 +135
==========================================
+ Hits 62661 62821 +160
+ Misses 7728 7703 -25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is missing, e.g., after applying the manual replacement, we no longer get the gray boxes when selecting items.
Screencast.From.2025-09-11.15-03-30.mp4
holoviews/selection.py
Outdated
try: | ||
inst._selection_override.event(selection_expr=new_selection_expr) | ||
inst._cross_filter_stream.selection_expr = new_selection_expr | ||
finally: | ||
with param.parameterized.discard_events(inst): | ||
inst.show_regions = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this has been indented and why the try/finally is needed.
Should there be a special case for inst.show_regions = True
when new_selection_expr
is None?
] | ||
) | ||
|
||
def test_select_expr_show_regions(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a UI test for this change.
if inst.show_regions: | ||
inst.show_regions = False | ||
inst._selection_override.event(selection_expr=new_selection_expr) | ||
inst._cross_filter_stream.selection_expr = new_selection_expr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what fixes #6688
Fixes #6687, fixes #6688
HoloViews.linked_selections.fix.mp4