stimulus_reflex: Lifecycle callbacks do not work

Bug Report

None of the callbacks get triggered after a succesful reflex

Expected behavior

afterReflex should trigger after every reflex

afterReflex(element, reflex)  {
 console.log('callback works')
}

Versions

StimulusReflex

3.3.0-pre2

External tools

  • Ruby: 2.7
  • Rails: 6.0.0

Browser

  • Chrome
  • 84.0.4147.89

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 33 (14 by maintainers)

Most upvoted comments

Thanks for sticking with this one, Ugurcan. It motivated me to find a better solution.

on that note we can close this issue I think. This is likely a different problem anyway.

Callbacks work with the change you have added. 👍

Perhaps we can revisit modals + ajax later on as more people provide feedback for it.

@leastbad ok found it. for npm i just needed to import the javascript folder in the repository. Importing the branch installs the ruby gem to node_modules

I can confirm that after_reflex works with this change 👍

That works! Thank you.