You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with d3.js-based visualizations ([email protected] -- https://cdn.jsdelivr.net/npm/d3@7) inside a custom component ([email protected]).
When refactoring my component to the new unified 3rd-party dependency declaration (#2991), the locally served library gets imported, but there seems to be an issue during the import:
When the component is initialized, an error is thrown: d3.select is not a function (for code example, see below).
Running the same d3.js-based command afterwards from the console produces the correct result (as indicated by the image below).
I'm currently unsure whether this is a nicegui- or js-import-related problem.
However, based on the fact that the module is available later, I'd assume that there is some timing problem related to nicegui.
Minimal example (using dependencies -- throws error)
Description
I'm working with d3.js-based visualizations ([email protected] -- https://cdn.jsdelivr.net/npm/d3@7) inside a custom component ([email protected]).
When refactoring my component to the new unified 3rd-party dependency declaration (#2991), the locally served library gets imported, but there seems to be an issue during the import:
When the component is initialized, an error is thrown:
d3.select is not a function
(for code example, see below).Running the same d3.js-based command afterwards from the console produces the correct result (as indicated by the image below).
I'm currently unsure whether this is a nicegui- or js-import-related problem.
However, based on the fact that the module is available later, I'd assume that there is some timing problem related to nicegui.
Minimal example (using
dependencies
-- throws error)Python-component:
JS-component:
Minimal example (using deprecated
libraries
-- runs as intended)Python-component:
JS-component:
The text was updated successfully, but these errors were encountered: