You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
gvwilson
changed the title
[Feature Request] Optional callback inputs
allow optional callback inputs
Nov 11, 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:
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.The text was updated successfully, but these errors were encountered: