---
title: Virtual Scroll
nav_title: Virtual Scroll
tags: demo
---
{% from "demo.njk" import demo %}
{% from "macro_config.njk" import config_table %}
{% set label %}
{% endset %}
{% set html %}
{% endset %}
{{ demo( label, html, script) }}
Related Tom Select Settings
{{ config_table([
{
name:'firstUrl',
desc:'(Required)
The firstUrl() method works along with getUrl() and setNextUrl() to supply your load() method with pagination friendly urls.
firstUrl(query_string) should return the request url for the first `page` of data.
Call setNextUrl(query_string,next_url) in your load() method upon request completion to define subsequent request urls.
Use getUrl(query_string) to retrieve the appropriate pagination url for the given query string.
',
type:'callback',
default:'null'
},
{
name:'maxOptions',
desc:'The max number of options to display in the dropdown.',
type:'int',
default:'50'
},
{
name:'render.loading_more',
desc:'Renders a message at the bottom of the dropdown to communicate to users that more results are being loaded',
type:'callback',
default:'function(data,escape){\n return `
Loading more results ...
`;\n}',
highlight:true
},
{
name:'render.no_more_results',
desc:'Renders a message at the bottom of the dropdown for communicating that users have reached the end of the results',
type:'callback',
default:'function(data,escape){\n return `
No more results
`;\n}',
highlight:true
}
])
}}
Plugin Configuration
No additional configuration settings for this plugin