Open thuydotm opened 3 years ago
Panel support for allow_None is definitely patchy, because Param supports it consistently but GUI toolkits don't typically handle None directly. I'm not sure what the best way to address this would be. For this particular example for numeric types Panel could convert the string "None"
to the Python attribute None
, or maybe Param could be changed to accept both None
and "None"
, but that won't work for string types, where we'd need to distinguish between None
and "None"
. And in general the widget libraries don't provide ways of setting something numeric or string type to None. So it's a tricky area...
ALL software version info
panel 0.10.0
Description of expected behavior and the observed behavior
Please see the example below.
tab_id
is a param.Integer object with allow_None=True. When directly settab_id
to None in the URL, panel reads it as a string of 'None' instead of a NoneType object. And this leads to validation fail.Complete, minimal, self-contained example code that reproduces the issue
Set the url as:
http://localhost:5006/test_deeplink?tab_id=None
Stack traceback and/or browser JavaScript console output