Open kaichiangbain opened 3 years ago
Dear Kaichiangbain - very interest in this project. Can we collaborateon the Mendix version? Regards, Boris
Sure. I am using the Mendix low code platform (mendix.com), which allows for React pluggable widget (https://docs.mendix.com/howto/extensibility/pluggable-widgets). The widget needs to allow multiple instances of it on the same page/DOM. Mendix also takes control of the DOM, thus widgets cannot arbitrarily apply an ID easily.
Since I am referencing this chart as-is via dependency "@unicef/react-org-chart": "0.3.4", I am trying to fix the hardcoded "root" in the original code. If this fails, I may need to import source code into my widget and change as necessary - definitely not preferable.
Trying to wrap this into a Mendix pluggable widget (a React widget), then place multiple of them in a page.
Noticed the dependency src\chart\index.js ... const orgChart = document.getElementById('root')
Where "root" is hardcoded, thus I cannot have multiple of these in a single page - I cannot have multiple divs with the same Id.
Make this part of the props passed in?