-
-
Notifications
You must be signed in to change notification settings - Fork 75
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: unbind event after partial fetched #94
Comments
I am not sure about unbinding the event, idea is to possibly toggle <a href='#' id='reload-comments'>Reload</a>
<%= render_async comments_path, toggle: { selector: '#reload-comments', event: :click } %> But, we can add a possibility to unbind the event if it's a problem for some folks. Leave 👍 if you'd like to see this in |
I want it. I'd love to render some widget by additional request and rerender it when some event happened. For now I can achive this only by hack with |
Add once option to remove event once it's triggered #94
This is solved in #96 and released in 2.1.4 version https://github.com/renderedtext/render_async/releases/tag/2.1.4 |
Shouldn't we unbind the Event after partial fetched? I notice that the event still triggered and fetch the partial every time after the partial already be rendered.
In jquery we can achieve this by use namespace event, and in pure js we can use removeEventListener
I would like make PR if this is a bug?
The text was updated successfully, but these errors were encountered: