-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Added support for selecting lists and dicts #50
Conversation
Codecov Report
@@ Coverage Diff @@
## master #50 +/- ##
==========================================
+ Coverage 91.14% 91.22% +0.07%
==========================================
Files 23 23
Lines 2925 2950 +25
==========================================
+ Hits 2666 2691 +25
Misses 259 259
Continue to review full report at Codecov.
|
Looks good. Want to add a unit test? 😄 |
Actually, the same solution works with interact too:
So it is still an error that the widget extends outside the widget box, but at least there's a workaround that's arguably the right thing to do anyway (use string names for any complex objects). |
Selector widgets currently need to do a reverse lookup on object identity, which requires that objects be hashable, which Bokeh palettes (as lists) are not. This PR and a matching PR on param converts lists to tuples when doing lookups, which works:
However, note that in both cases the representation of the list is vastly larger than the widget box, which in the second example ends before
(2, '#000000')
starts. @philippjfr, is there a way to truncate the representation in the widget when it's longer than the box?For a Param-based widget the solution is to provide string names, but I'm not sure how to do that with
interact
: