-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dash's new pattern-matching callbacks require component ids to be dictionaries #281
Comments
Crystal Toolkit is already using pattern-matching callbacks! :) We could be using them more extensively however, probably to our benefit (see #265). The problem is that last I checked you cannot write client-side pattern-matched callbacks. If this changes, I think it'd be a good time to re-visit. |
Still no support for that if you're referring to plotly/dash#1461? But afaict, CT only has 3 client-side callbacks, all in |
Pattern matching is also used for anything that uses the "keyword-argument-style" inputs, e.g. The benefit of adopting pattern matching everywhere is that currently a unique callback is defined for every instance of a given component, e.g. if you have Apart from unnecessarily bloating the list of callbacks, this also means that you can't just drop in If, instead, we used pattern-matched callbacks throughout, we would only need the one set of callbacks defined, and returning |
From https://dash.plotly.com/pattern-matching-callbacks: "The pattern-matching callback selectors MATCH, ALL, & ALLSMALLER allow you to write callbacks that respond to or update an arbitrary or dynamic number of components."
However, this functionality requires that component ids are dictionaries, not strings. In addition, Input and State inside of callbacks need to be able to accept dictionaries as well.
Would it be difficult to implement these changes in crystal toolkit?
The text was updated successfully, but these errors were encountered: