d146313256
In the past, `initSelection` was used for loading in data objects for the pre-selected options. Now that Select2 is using a `<select>` element, there is no need for doing this because the `<option>` elements should provide the relevant information. So you can now just pull this information from the remote data source (or static array, in some cases) and build out the `<option>` elements manually. In most cases you don't need to go the full length with a custom data adapter, but instead are just looking to pre-load elements on the initial page load. This improves https://github.com/select2/select2/issues/3116. |
||
---|---|---|
.. | ||
_includes | ||
_layouts | ||
dist | ||
vendor | ||
.gitignore | ||
announcements-4.0.html | ||
community.html | ||
examples.html | ||
index.html | ||
options.html | ||
README.md |
Select2 Documentation
This repository holds the latest documentation for Select2.
What is this?
The documentation is automatically extracted from the docs
directory at the
Select2 source repository. This is done periodically by
the maintainers of Select2.
How can I fix an issue in these docs?
If you are reading this from the source repository, within the docs
directory,
then you're already in the right place. You can fork the source repository,
commit your changes, and then make a pull request and it will be reviewed.
If you are reading this from the documentation repository, you are in the wrong place. Pull requests made directly to the documentation repository will be ignored and eventually closed, so don't do that.
How can I build these docs manually?
In the main Select2 repository, you can build the documentation by executing
grunt docs
Which will start up the documentation on port 4000. You will need Jekyll installed to build the documentation.