EloquentStudio / filter.js

Complete solution for client side filtering and rendering using JSON data
http://eloquentstudio.github.io/filter.js
MIT License
664 stars 183 forks source link

Disable instant search #19

Open slyapustin opened 11 years ago

slyapustin commented 11 years ago

I have many complex objects (about 5000) and want to have ability to filter them on page. But i don't want to trigger instant search after enter every symbol and choosing every search criteria. I want to bind filter() only to search button click event.

jiren commented 11 years ago

For this you have to customise filter.js. You have to comment out following line in filter.js.

this.bindEvents(); //line: 59 

After this you have to create FilterJS object and then bind event on button i.e

var fjs = FilterJS(items, "#container", view, options);
$('#search_button').on('click', function(){
    fjs.filter();  
})
slyapustin commented 11 years ago

Thanks!

ghost commented 10 years ago

Hi, is there something wrong with this method on the current version? I cant seem to stop the auto searching

jiren commented 10 years ago

I check above things and it is working. Can you send me more detail how you have implemeted so I can get better idea.

ghost commented 10 years ago

http://jshdk.co.uk/anime/ is where i'm trying to implement it, you should be able to see the links to the css and js files, Thanks!

sudeervc commented 9 years ago

Hello,

I am not finding the "this.bindEvents();" line of code in filter.js - Does it cahnged in the latest version. CAn you help stopping the instant search.

Also, I want to stop showing all the results by default. can you let me know if this is possible to do, if so can you guide me.

~S.

jiren commented 9 years ago

Yes version is changed.

sudeervc commented 9 years ago

So can you help implement stopping the initial search and not show the results by default? Thanks.

jiren commented 9 years ago

This weekend I am going to update filter.js for few more features and also this one.

sudeervc commented 9 years ago

Thanks very much. I will be waiting excited to see how it works.