Tagify: Pagination in dropdown

Created on 30 Dec 2019  路  7Comments  路  Source: yairEO/tagify

Hi. Maybe there are exists the way to create scrollable pagination within ajax populated dropdown like in select2?

Question Suggestion

Most helpful comment

@evsign - Ok, I will add a new event for the scroll position of tagify's suggestions dropdown. hopefully I will release it in a few days from now.

All 7 comments

Do you have a link with an example to show me?

Yeah. https://select2.org/data-sources/ajax
At the top of the page there are select input where ajax call is triggered after only one input and you can infinitely scroll search suggestions.

This is lazy-loading of list items while scrolling, it's not a real pagination.
Why would you want that? is it slow on the server side to pull the whole list of results and return it with the ajax response?

From my point of view lazy-loading its almost the same as pagination) We display first page of results and when we encounter end of this results we display the second and so on.

This is very useful for user friendliness of interface. For example user don't know what tag to add and instead of adding some random useless thing user can explore already created tags to choose what to add.
Also when, for example, we found in database something like 30 results total, which we cannot display on the page at one time, and then we don't need to load its all at once, but we can do 3 requests with 10 results in response. Considering that average user could not load more than 1-2 pages we save some computation time in average (i suppose).

Actually this is very common feature for suggestions dropdown)

@evsign - Ok, I will add a new event for the scroll position of tagify's suggestions dropdown. hopefully I will release it in a few days from now.

Thanks! Ideally will be if you add event like dropdown:end in which will be passed number of occurrence which can be used as a page for subsequent request.

Hello, this method is already implemented, if so, could you give me a small example of how to use it, Thank you very much

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mzangari picture mzangari  路  4Comments

raoul2000 picture raoul2000  路  6Comments

erniomaldo picture erniomaldo  路  5Comments

biznickman picture biznickman  路  6Comments

Mushr0000m picture Mushr0000m  路  6Comments