New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ujs ajax events with stimulus actions #78
Comments
|
@mmlindeboom Are you using |
|
As @lsylvester says, you’ll need to make sure to use |
|
Thank you! |
|
how could I use rails-ujs in webpacker? [edited] I find the solution for myself. but leave a reference for someone has same question like mine
import Rails from 'rails-ujs';
Rails.start()reference: https://github.com/rails/rails/tree/master/actionview/app/assets/javascripts#es2015 PS: rails 5 has ujs build-in |
|
If you are working on a project where you can't switch from I did a small write-up about it on the Stimulus Discourse: |
First of all, thank you for Stimulus -- it's great.
I'm wondering if it is possible currently or planned to be able to bind to ujs ajax events with stimulus's action binding syntax.
I have a modal I want to close on an
ajax:successevent after the modal's form is submitted . Placing the data attributedata: {action: 'ajax:success->modal#close'}on the form doesn't seem to bind, or I haven't been able to suss out my error.It's no problem to bind it manually once the controller is connected, but the action syntax is pretty nifty.
The text was updated successfully, but these errors were encountered: