Comments (3)
this is how select2 already works. when it is opened updateResults() method is called which performs the query.
if you want to "merge" initial data with further-loaded remote data you should probably roll your own query() function and handle it within that.
i know @justindujardin was working on something similar, maybe he can give you some pointers.
from select2.
I'm talking about it showing the first n rows without typing in anything
Sent via Hubroid
from select2.
i think we are talking about the same thing. this is, for example, how Select2 shows all the select choices when it is first opened - the query function matches all options when search is empty.
so, if you do not set the minimumInputLength
parameter, or set it to zero, query()
is called when the select2 is opened and returned choices will be displayed right away.
from select2.
Related Issues (20)
- In the latest version of Firefox , the document click event is triggering when a mousedown event occurs on a select element while using Select2. This behavior is different from other browsers. HOT 2
- Option for highlightFirstItem to always highlight first actual result
- Need a Vanilla JavaScript version of Select2 HOT 2
- DataTables warning: table id=DataTables_Table_4 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
- automatic dropdownParent HOT 1
- troubleshooting page mobile view issue
- When Ajax is enabled and minim characters length the dropdown doesn't include the option stuff HOT 3
- I have json in back-end With product name and description Search with name is working I want to let list apear based on Name and Product Description Parameters
- Release not done for several years HOT 1
- Abort ajax call when the input is less than minimumInputLength
- Select2 issue in which selected value is not showing properly when the Select is re-opened HOT 1
- Caret navigation is staying even after the if we choose the first option from dropdown, it is only in IOS devices.
- Unselect not working when search field is outside viewport
- Left alignment problem when opened upwards HOT 2
- Support for jQuery 4 HOT 12
- Becoming a contributor to transfer issues
- Is this Repo dead? HOT 1
- Scrolling with keys, while the mouse pointer hovers over the list
- doesn't play well with standard es modules HOT 1
- select2.min.js:2 Select2: The language file for "./i18n/ko" could not be automatically loaded. A fallback will be used instead.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from select2.