bernadd
bernadd

Reputation: 700

Select2 loading more data on scroll end

Does anyone know how can I achieve following:

I need select2 dropdown which would appear 50 records. On reaching bottom scroll it would load another 50 etc...

On their site i found http://ivaynberg.github.io/select2/#infinite but this involve "search", so I have to type at least 3 chars to search db using ajax... I dont need that, I need 50 records loaded immediatelly on load and visible inside select2 and rest per scrolling...

Does anyone know if this can be achieved with select2 and how (to post me example)... If not is there any another plugin which could allow me this?

Thanks!

Upvotes: 1

Views: 2857

Answers (1)

Ferry Kranenburg
Ferry Kranenburg

Reputation: 2635

Set property minimumInputLength:0 so it fetches the first records immediately, not after 3 characters.

Upvotes: 1

Related Questions