A
A
Alexander Pantyukhov2016-06-03 09:26:03
Yii
Alexander Pantyukhov, 2016-06-03 09:26:03

How to show complete select2 list?

Hello.
Who knows how to display the entire dropdown list in select2?
Those. when you click on select2, a window opens in which there are 6 elements and a scroll. There are 8 or 10 elements in total, how to display them all at once without scrolling?
Here is how I display it select2

echo $form->field($modelForm, 'applicationTypeId')->widget(\kartik\widgets\Select2::classname(), [
    'data' => $modelForm->selectSaleType,
    'pluginOptions' => [
        'width' => '155px'
    ],
    'options' => ['placeholder' => 'All', 'multiple' => true]]);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
VitGun, 2016-06-03
@VitGun

Try setting the parameterminimumResultsForSearch: Infinity

A
Alexander N++, 2016-06-03
@sanchezzzhak

stackoverflow.com/questions/14824676/how-do-i-chan...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question