param
param copied to clipboard
Create a new `objects` instead of appending a value when `check_on_set` is False
This is useful for Panel when an AutocompleteInput
widget is created from a Selector
Parameter, with restrict
(widget) and check_on_set
(Parameter) set to False. Before this change, a new value manually added to the list of completions/options by a user would just be appended to objects
, and as such not reflected in the widget options
. With this change objects
and options
are in sync.
Codecov Report
Merging #596 (69dc92b) into master (7d702ad) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #596 +/- ##
=======================================
Coverage 81.95% 81.95%
=======================================
Files 4 4
Lines 3020 3020
=======================================
Hits 2475 2475
Misses 545 545
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 7d702ad...69dc92b. Read the comment docs.
Hmm. Is there a different way that we can get Panel to realize that the object list has changed? Here it seems like the user may have their own reference to the list of objects and expect to be able to modify that list as needed to change the available options, especially outside the context of Panel.
Do you mean something like that?
This should no longer be needed once https://github.com/holoviz/param/pull/598 is merged because that triggers events even when modifying .objects
inplace.
I'll close because even if we decide to remove the trigger from #598 we should use .param.trigger
instead of replacing the list.