Answer the question
In order to leave comments, you need to log in
How in a regular gridview when using select2 to change query get call when enter is pressed instead of selecting value from select2 list?
There is a standard Yii2 GridView where Select2::widget is used in the filter
[
'label' => 'Авторы',
'attribute' => 'authorids',
'format' => 'html',
'filter' => Select2::widget([
'name' => 'authorIds',
'data' => Authors::find()->addSelect(["CONCAT(firstname, ' ', lastname) AS fullname", "id"])->indexBy('id')->column(),
'options' => [
'placeholder' => 'Выберите автора ...',
'multiple' => true,
],
'pluginOptions' => [
'allowClear' => true
],
]),
],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question