I am using Dash cytoscape and would like users to be able to select nodes and have all the properties on each node visible in a dbc alert to pop up when the user clicks the node and otherwise be hidden.
Currently it is working if I don’t hide the alert…is there a way to get this alert working with is_open=False initially and then is_open True once the node is tapped, with the data also being shown???
Layout coding excerpt:
dbc.Col([html.P(),
html.Div(children=dbc.Alert(id='tap-node-json-output', color='primary', dismissable=True, fade=False, is_open=False)),
more layout coding after this point...
Callback code:
@callback(Output('tap-node-json-output', 'children'), Input('cytoscape', 'tapNode')) def display_tap_node(data): if data: return json.dumps(data['data'], indent=2)