Open
Description
openedon Nov 8, 2024
Problem
In a number of cases, I have callbacks that have Inputs/States that are only conditionally present on the page, which causes console errors (ReferenceError), and prevents the callback to run.
Examples where this could happen:
- A global store at the app level being updated from inputs on a given page -> this will raise the ReferenceError log when I am on a different page
- Several objects that are conditionally present on a page and update another element
Expected solution
I would like to be able to mark inputs as optional, in which case they would default to None in the callback when the element is not present.
Current workaround
In some cases I can use a pattern matching callback with ALL
to make the input optional (no input will give an empty list), however this feels hackish and does not always work with existing pattern-matching ids.
Activity