Enable from_param to return None when precedence is negative #2738
Labels
good first issue
Good for newcomers
type: enhancement
Minor feature or improvement to an existing feature
Milestone
Panel==0.12.0
Param==0.11.1
I often use the
from_param
method on panel widgets now to provide some quick styling to widgets, or to use a different widget than the default for a param object. The syntax is much more succinct than what i was doing previously (usually usingpn.Param
). However, thefrom_param
method does not support param objects that have a negative precedence.Executing this code produces the flowing error:
It seems like this could easily be supported by modifying line 73 of
panel/widgets/base.py
to:If this were supported we could use the
from_param
method universally and not have to consider if the param object in question would ever have a negative precedence.The text was updated successfully, but these errors were encountered: