-
-
Notifications
You must be signed in to change notification settings - Fork 406
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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6689 +/- ##
==========================================
+ Coverage 89.02% 89.03% +0.01%
==========================================
Files 329 329
Lines 70389 70443 +54
==========================================
+ Hits 62661 62721 +60
+ Misses 7728 7722 -6 ☔ 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
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?
@@ -175,6 +175,18 @@ def test_layout_selection_points_table(self): | |||
] | |||
) | |||
|
|||
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.
Fixes #6687, fixes #6688
HoloViews.linked_selections.fix.mp4