Skip to content
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

onCreate does not return popper instance #36

Closed
JSteunou opened this issue Apr 27, 2016 · 6 comments
Closed

onCreate does not return popper instance #36

JSteunou opened this issue Apr 27, 2016 · 6 comments
Assignees
Labels
bug Something is not working.

Comments

@JSteunou
Copy link

Tried to follow the documentation with onCreate onUpdate but it cannot be chained. onCreate return undefined

@FezVrasta FezVrasta added the bug Something is not working. label Apr 27, 2016
@FezVrasta
Copy link
Member

FezVrasta commented Apr 27, 2016

May you test the new fix-36 branch and let me know if it fixed your problem?

ps.
seems not working, help is more than welcome :/

#37

@FezVrasta FezVrasta self-assigned this Apr 27, 2016
@JSteunou
Copy link
Author

weird PR looks ok

@FezVrasta
Copy link
Member

I know :(

@JSteunou
Copy link
Author

JSteunou commented Apr 28, 2016

I applied your patch directly in the node_modules src in my project and it works fine. If it's just your test going wrong, check you're actually running them on src and not build.

@FezVrasta
Copy link
Member

Yup the tests run on src...

FezVrasta added a commit that referenced this issue Apr 30, 2016
@FezVrasta
Copy link
Member

80aa0df should have fixed the problem once for all.

The test was failing because onUpdate() is not getting called on initialization, this mean that you should manually trigger it if you want it to run.

new Popper()
.onUpdate(function(data) {
  console.log(data);
})
.onCreate(function(instance) {
  instance.update();
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

2 participants