my select2 control inside column bootstrap class 'col-sm-3'. attached form field. width not want 100% of parent column. if make browser window smaller (after columns auto-rearangment) select2 follows width of parent column. if specify width in px changes width. problem? same story form->field->textinput. found field width not follow parent column width if form inline.
<?= $form->field($model, 'categories')->widget(select2::classname(), [ 'data' => category::availablecategories(), 'model' => $model, 'attribute' => 'categories', 'theme' => select2::theme_krajee, 'size' => select2::medium, 'showtoggleall' => false, 'language' => 'en', 'options' => ['placeholder' => 'select category...', 'id' => 'myselect'], 'pluginoptions' => [ 'allowclear' => true, 'multiple' => true, 'width' => '200px', ], ]) ?>
i had inline
layout in form. problem.
Comments
Post a Comment