allow_optional is super useful for Input and State. Pretty please would it be possible to add it to Output too? 🙏
I would have liked to use this a few times before in callbacks where I use optional inputs, but now with devtool.hook it seems impossible to achieve some very useful functionality without having it.
Currently it seems like the components added by devtool.hook should be addressable in callbacks. There's no docs on this, but it's explicitly tested. Clearly this needs allow_optional since the component is only present when debug=True.
So at the moment it's possible to use components added in devtools as callback inputs/states but not as outputs. This feels like it's missing some very useful functionality that would be enabled if we could set allow_optional on Output.
How would an Output(allow_optional=True) work in practice? I guess the callback function would still return a value, but if the output doesn't exist it just doesn't raise an error for a non-existent Dash component.
allow_optionalis super useful forInputandState. Pretty please would it be possible to add it toOutputtoo? 🙏I would have liked to use this a few times before in callbacks where I use optional inputs, but now with
devtool.hookit seems impossible to achieve some very useful functionality without having it.Currently it seems like the components added by
devtool.hookshould be addressable in callbacks. There's no docs on this, but it's explicitly tested. Clearly this needsallow_optionalsince the component is only present whendebug=True.So at the moment it's possible to use components added in devtools as callback inputs/states but not as outputs. This feels like it's missing some very useful functionality that would be enabled if we could set
allow_optionalonOutput.How would an
Output(allow_optional=True)work in practice? I guess the callback function would still return a value, but if the output doesn't exist it just doesn't raise an error for a non-existent Dash component.