rails / request.js

MIT License
389 stars 28 forks source link

Await turbo stream insertion in DOM #36

Closed excid3 closed 2 years ago

excid3 commented 2 years ago

Turbo Streams are inserted into the DOM async currently. Being able to wait until these elements are inserted allows for the user to apply animations and take other actions after the insert is complete.

The wait won't break any existing usage, it would only introduce a small wait while the elements are inserted.

This should fix #35

janko commented 2 years ago

@excid3 Thank you for the quick fix. We've just tested it in our app, and it works as expected 👍🏻

excid3 commented 2 years ago

Fantastic. I think this is good to go then @marcelolx 👍