Closed danielsousaio closed 4 years ago
+1 Currently it generates a lot of unwanted AJAX calls if you use it with some other stuff that internally uses input (e.g. selectivity.js). The ":input[name^='filterrific']" is a super simple fix that works.
Any update on this ? Issue was opened Sep 5, 2017
.
@jhund would love to close this issue, any thoughts?
You can write your own logic by specifying a different ID like so:
= form_for_filterrific @filterrific, { html: { id: 'foobar' } } do |f|
And write your own custom JS
Hello,
I'm working with other inputs inside form_for_filterrific, and your jquery listens for every input event. I believe that should not be the case, instead you could target only inputs that have names starting with filterrific.
Scenario for your thoughts:
Ideas and solutions:
Target only inputs with name starting by filterrific. ":input[name^='filterrific']",
Allow the periodically observable class to have another complementary class or data attribute to specify a delay for this scenarios.
https://github.com/jhund/filterrific/blob/d1d533cbbe88007dc10bbc251db01a0756573db9/app/assets/javascripts/filterrific/filterrific-jquery.js#L85