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
Support for layout options that accept JS func #25
Comments
Dash clientside callbacks accepts JS, so that should cover some scenarios. If you find a use-case that is not covered, feel free to reopen this. |
Thank you for creating this issue. Could you please show the code how you would solve your example with the dash clientside callback? |
@ThomWorm Did you ever get this to work ? I can't seem to get it right. |
did anyone ever come up with an example? I want to try this option on |
seems like the way to do this is, write the JS function as a string in Python... on the JS side, this string would need passed into something like |
Hi, I'm a bit late but I just wrote an answer on stackoverflow that shows how we can use a clientside callback to assign a JS function to a component property, it addresses the use case of @nmz787-intel but it should help others too. @pbelmann @ThomWorm @MoburgLeGrand Is it possible to use the |
Description
Certain layout contains options that accept functions. For example, the grid layout:
Obviously,
position
is not accepted in Python, since it accepts input that is a function mapping from a node object to a{row,col}
object.Possible Solution
Optionally accept dictionary input instead of a function on the Dash/Python side. On the react side, the function will simply look up the object's names (i.e. dictionary keys) and return the corresponding value.
The text was updated successfully, but these errors were encountered: