/select2-searchInputPlaceholder

Extends Select2 plugin by adding an option to set a placeholder for the dropdown 'search' input field.

Primary LanguageJavaScript

Select2 - 'searchInputPlaceholder' option

Extends Select2 v4 plugin by adding an option to set a placeholder for the 'search' input field.

Demo

Demo available on JsFiddle.

Usage

Initialize the select2 plugin with the searchInputPlaceholder option.

$("select").select2({
    // options 
    searchInputPlaceholder: 'My custom placeholder...'
});

Setup

Include the script after Select2 main javascript file:

<script src="select2.js"></script>
<script src="select2-searchInputPlaceholder.js"></script>