-
Notifications
You must be signed in to change notification settings - Fork 33
Handle loading component suites dynamically #46
Comments
Something like this might work: https://github.com/zeit/next.js/#3-with-no-ssr |
See our workaround: Grasia/grasia-dash-components#2 |
I'm running into this or a very similar issue with a custom react component that must be dynamically created. It is not trivial to statically add this react component to the app.layout so that it will included in the crawl. Is there a simple way that we can force dash to include this react component? |
@edvard-bjarnason You can override the dash index and include your component bundle in there. |
@edvard-bjarnason meanwhile Dash add support to load components dynamically, you could try to use our Import facility within our own made Dash components suite. So with this Import component you can directly add an external javascript once the page and Dash is completely loaded, you could use javascript code that sets your component to show up on a certain time, be hooked to an event or be displayed in a certain place. I'm curious, though, if we could make gdc.Import work for loading the dependencies a React component that is going to be added dynamically to the Dash app...It doesn't look like, so if you really need that and only that, most likely you will need to have a null component for your suite or a null state of your component, so you can add that to the app.layout in static time and then replace or just load your complete component in run time. Let me know how far your research goes and if you get it working. |
This has been fixed in plotly/dash#444. Invisible component hacks are no longer needed! 🥇 to @T4rk1n who took this on 🎉 |
Related to plotly/dash-table-experiments#28 and plotly/dash-core-components#162
It was explained in more detail on the community boards https://community.plot.ly/t/display-tables-in-dash/4707/40?u=chriddyp:
Ideally, we'd request dash's backend for the component suites on demand, rather than all upfront.
The text was updated successfully, but these errors were encountered: