kartik-v / yii2-widgets

Collection of useful widgets for Yii Framework 2.0
http://demos.krajee.com/widgets
Other
558 stars 177 forks source link

Depdrop bootstrap 4 error #376

Open mtc-toolbox opened 5 years ago

mtc-toolbox commented 5 years ago
  1. Using bootstrap 4. In bootstrap 3 (from box All ok).

Dep drop code:

echo $form->field($pointModel, 'Country')->dropDownList($countryList, ['id' => 'point-country-id']);

    echo $form->field($pointModel, 'Region')->widget(DepDrop::classname(), [
        'type'           => DepDrop::TYPE_SELECT2,
        'data'           => $regionsList,
        'options'        => [
            'id'          => 'point-region-id',
            'placeholder' => Yii::t('app', 'Select ...'),
        ],
        'select2Options' => [
            'pluginOptions' => [
                'allowClear' => true,
            ],
        ],
        'pluginOptions'  => [
            'depends'     => ['point-country-id'],
            'url'         => Url::to(['region/list']),
            'loadingText' => 'Загрузка ...',
        ],
    ]);

In first step I saw (attached image). image

When I select new country I send: {"output":[{"id":"0f910fc4-3da9-53ff-aa51-61d63e27ba33","name":"Крым"},{"id":"a8c49954-a8e9-55fd-b10f-0cf8ffd298fb","name":"Краснодарский Край"}],"selected":"0f910fc4-3da9-53ff-aa51-61d63e27ba33"}

And see: image

Why ?!

In bootstrap 3 all fine.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/70065364-depdrop-bootstrap-4-error?utm_campaign=plugin&utm_content=tracker%2F530581&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F530581&utm_medium=issues&utm_source=github).
mtc-toolbox commented 5 years ago

May be any scripts I must include ?