Selectize.js: Load more content/infinite scrolling with Ajax

Created on 20 Apr 2015  路  5Comments  路  Source: selectize/selectize.js

I have thousands of records in my database and i can't load all of them at once in selectize. Currently I'm using selectize such that i filter results by user input on server side and return all of them. This isn't very good approach because if there are too many results then all of them are fetched from database. I need autoloading of records through ajax when user scrolls through records. Can selectize handle this? If yes then how? What other options do i have for this scenario?

Most helpful comment

All 5 comments

In my opinion searching for desired option in a list of more than 20 options would be a pain for each user. Needless to say, for hundreds or thousands of records it would be much worse UX (and infinite scroll feature will slow that process down even more).
So I'd recommend you having good search algorithm, which will first show most popular items, limited to 10 or 15 (and if user refines a query, fetch options which suit him most).
Or, if the situation allows you, just split them into a few selects. For example: instead of having one list for all cities in the US, you can add state select, and when user selects his state, show only cities which belong to that (also limited by 15, and sorted by popularity).

In my case I have clients records which cannot be broken down into sub groups.

How to load more with button "Load more..."? I mean that it don't load data automatically.

closing stale issues older than one year.
If this issue was closed in error please message the maintainers.
All issues must include a proper title, description, and examples.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adrianmihalko picture adrianmihalko  路  4Comments

tr4g picture tr4g  路  4Comments

vilimco picture vilimco  路  5Comments

fadhilanugrah picture fadhilanugrah  路  4Comments

daveedwards45 picture daveedwards45  路  3Comments