oroinc / platform

Main OroPlatform package with core functionality.
Other
627 stars 351 forks source link

dynamically Import widget manager #1085

Closed RocKordier closed 5 months ago

RocKordier commented 2 years ago

To use widget manager inside twig templates with loadModules its necessary to dynamically import it.

Example:

    <script type="text/javascript">
        loadModules(['oroui/js/widget-manager'],
            function(widgetManager) {
                widgetManager.getWidgetInstance({{ app.request.get('_wid')|json_encode|raw }}, function(widget) {
                    ...
                });
            });
    </script>

I can do it also by my own, but ATM there are so many dynamic-imports and I'm not quite sure why the widget manager is missing.

Thx.

anyt commented 2 years ago

Hi Eric, The enhancement makes sense. Thank you for your contribution. Internal ticket id BAP-21507.

RocKordier commented 1 year ago

@anyt any updates here? i've rebases the MR against the latest master

RocKordier commented 5 months ago

as it was published in 6644adbb745fb9c089e46b149698d24adeccc48d we can close here. thx @anyt :)

Happy Easter 🐣