yii2-multi-select-widget icon indicating copy to clipboard operation
yii2-multi-select-widget copied to clipboard

Is it compatible with bootstrap 4?

Open baltechies opened this issue 4 years ago • 2 comments

I am facing issue on mobile devices. Select dropdown is open by default and its not closing after selecting. on bigger screens its working

baltechies avatar Mar 04 '20 11:03 baltechies

It is not compatible but for now you can just extend it and by changing assets will do the trick .


class MultiSelectAsset extends AssetBundle
{
    public $sourcePath = '@npm/bootstrap-multiselect/dist';

    public $js = [
        'js/bootstrap-multiselect.js'
    ];

    public $css = [
        'css/bootstrap-multiselect.css'
    ];

    public $depends = [
        'yii\bootstrap4\BootstrapPluginAsset'
    ];
}

change 'yii\bootstrap\BootstrapPluginAsset' with 'yii\bootstrap4\BootstrapPluginAsset'

ghost avatar Apr 17 '20 19:04 ghost

...which is pretty easily done by merging the following into your config components section to override the plugin dependency.:

'assetManager' => [
    'class' => 'yii\web\AssetManager',
    'bundles' => [
        'dosamigos\multiselect\MultiSelectAsset' => [
            'depends' => [ 'yii\bootstrap4\BootstrapPluginAsset' ],
        ],
    ],
],

steve962 avatar Feb 03 '21 16:02 steve962