Pro Pack
Docs HomeProduct SiteSupport
  • Introduction
  • Installation
  • Chart.js
    • Configuration
    • Data Binding
    • Data Labels
  • Dataset Filter Labels
    • Installation
    • Configuration
    • Data Binding
  • DataTables
    • Configuration
    • Data Binding
    • Events
    • Methods
  • Date Range Picker
    • Configuration
    • Data Binding
    • Methods
  • iCheck
    • List
      • Configuration
      • Data Binding
      • Events
    • Filter
      • Configuration
      • Data Binding
  • Select2
    • Configuration
    • Data Binding
    • Events
    • Methods
  • Sparklines
    • Installation
    • Configuration
    • Data Binding
  • Toastr
    • Configuration
  • Web Frameworks
Powered by GitBook
On this page
  • Installation
  • Class
  • Render

Was this helpful?

Select2

PreviousData BindingNextConfiguration

Last updated 2 years ago

Was this helpful?

gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options.

Select2 for WireBootstrap brings Select2 into the WireBootstrap framework providing a powerful way of filtering data in applications developed with Bootstrap themes.

Installation

The Select2 for WireBootstrap library is located in wire-select2.js. This and other other related files can be installed from the NPM package registry at@wirebootstrap/wire-select2.

npm install @wirebootstrap/wire-select2

Class

To create a new instance of the Select2 for WireBootstrap component, use the wire.select2 class.

const select2 = new wire.select2();

Render

Render the component using an HTML select element.

<select id="select" class="form-control"></select>
<script>
    new wire.select2().render("#select", {});
</script>
<wire-select2 wr-config=""></wire-select2>
<WireComponent component="wire.select2" config={}>
    <select className="form-control"></select>
</WireComponent>
<select 
    wire-component="wire.select2" 
    v-wire-config="" 
    class="form-control">
</select>
<select 
    wire-component="wire.select2" 
    [config]="" 
    class="form-control">
</select>

Select2 for WireBootstrap will load select2.full.min.js from a if it's not found on the page.

Select2 for WireBootstrap will load select2.min.css from a if not found on the page.

Select2 for WireBootstrap extends the class. As such, it inherits all the base functionality of that class.

CDN
CDN
wire.ui.component
Select2
Select2 for WireBootstrap