param icon indicating copy to clipboard operation
param copied to clipboard

Create a new `objects` instead of appending a value when `check_on_set` is False

Open maximlt opened this issue 2 years ago • 3 comments

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.

maximlt avatar Jan 25 '22 18:01 maximlt

Codecov Report

Merging #596 (69dc92b) into master (7d702ad) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           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.

codecov-commenter avatar Jan 25 '22 18:01 codecov-commenter

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.

jbednar avatar Jan 26 '22 18:01 jbednar

Do you mean something like that? image

maximlt avatar Jan 26 '22 18:01 maximlt

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.

philippjfr avatar Jan 09 '23 14:01 philippjfr

I'll close because even if we decide to remove the trigger from #598 we should use .param.trigger instead of replacing the list.

philippjfr avatar Jan 09 '23 14:01 philippjfr