Open xorgxx opened 4 hours ago
It seems that I’ve found a solution, though I’m not sure if it’s the best approach since I haven’t seen this documented anywhere 👍
<div {{ stimulus_controller('@xorgxx/neox-dashboard-bundle/neox-modal') }}>
<button data-action="click->xorgxx--neox-dashboard-bundle--neox-modal#modal">Open Modal</button>
</div>
To declare the controller, use {{ stimulus_controller('@xorgxx/neox-dashboard-bundle/neox-modal') }}
,
but for the data-action, use "click->xorgxx--neox-dashboard-bundle--neox-modal#modal".
i find this strange no ?
!!!! It might be worth considering modifying the page /create_ux_bundle.html to clearly highlight that the link
<div {{ stimulus_controller('@xorgxx/neox-dashboard-bundle/neox-modal') }}>
<button data-action="click->xorgxx--neox-dashboard-bundle--neox-modal#modal">Open Modal</button>
</div>
stimulus_controller('@xorgxx/neox-dashboard-bundle/neox-modal')
is automatically handled and "transformed," whereas other instances like data-action="click->xorgxx--neox-dashboard-bundle--neox-modal#modal"
you need to be set up manually.
Hi, I've tried many different solutions for this issue link to discussion.
It seems that while the controller.js is being loaded (as confirmed by the console log), the "event" isn't being triggered when the page loads.
I'm stuck at this point and wondering if it's the same issue. Any insights?