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

Toggle event just refreshing the page #101

Closed
railsdevsiargao opened this issue Jan 11, 2020 · 2 comments
Closed

Toggle event just refreshing the page #101

railsdevsiargao opened this issue Jan 11, 2020 · 2 comments

Comments

@railsdevsiargao
Copy link

Hi there,

I'm using the toggle events as listed in your docs and when I click the 'Details' button, the page refreshes. Even if I add "onclick='return false;'" nothing happens at all, the server action isn't called.

<%= render_async comments_path, toggle: { selector: '#detail-button', event: :click } do %>
  <a href='#' id='detail-button'>Load More</a>
<% end %>

Any advice or tips?

@nikolalsvk
Copy link
Owner

Hey, @railsdevsiargao! Thanks for submitting an issue!

I tried doing the same thing in my example Rails app and I'm getting the action to load. Could you maybe post more code so we can debug this? Are you maybe getting any errors in the browser console when you click the Load More link?

@nikolalsvk
Copy link
Owner

Closing this due to inactivity! If the problem is still occurring, feel free to reopen or comment here.

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

No branches or pull requests

2 participants