Yii2 wrapper for boostrap4-select.
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yiier/yii2-bootstrap4-select "*"
or add
"yiier/yii2-bootstrap4-select": "*"
to the require section of your composer.json
file.
You can view demo and examples here.
<?php
use yiier\bootstrap4\select\SelectPicker;
echo $form->field($model, 'attribute')->widget(SelectPicker::class, [
'items' => ArrayHelper::map(User::find()->all(), 'id', 'email'),
'options' => [
'prompt' => '',
'multiple' => true,
],
'clientOptions' => [
'liveSearch' => true,
'noneSelectedText' => '',
'styleBase' => 'form-control',
'style' => '',
],
'clientEvents' => [],
]) ?>