platform icon indicating copy to clipboard operation
platform copied to clipboard

dynamically Import widget manager

Open RocKordier opened this issue 3 years ago • 2 comments

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.

RocKordier avatar Jul 10 '22 11:07 RocKordier

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

anyt avatar Jul 11 '22 09:07 anyt

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

RocKordier avatar May 01 '23 08:05 RocKordier

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

Happy Easter 🐣

RocKordier avatar Mar 31 '24 22:03 RocKordier