Open tr8dr opened 3 years ago
same issue
same issue
I need a way to update a 3D plot in Dash periodically with data generated in the backend Dash app. Not sure if this issue would provide for this, but if it does, it would make Dash infinitely more useful to us.
There are situations where may want to send events into dash from a part of the DOM not managed / generated by Dash. For example, DHTML may be generated by a backend and inserted into the DOM shared by Dash. If such content has events, would like to propagate specific events to Dash (and through react's event mechanism).
I have found a way to "hack" this in, but requesting a "proper" implementation. The hack is as follows:
The usage is as follows:
In the external code, events are sent using the DOM onEvent triggers:
Clicking this externally provided button would call the sendEvent() javascript and cause the hidden element to take on the value of the payload and trigger the react event.
The proposal would be to do away with the requirement for the hidden ExternalEventRendezvous() element (which is an Input element).
Here is the supporting javascript function:
And here are the python functions: