yii2-selectize-widget
yii2-selectize-widget copied to clipboard
Remove the Bootstrap 3 dependency
I use Bootstrap 4 (throgh a component). After I start using your component, Bootstrap 3 connects and my styles get overriden.
It happens because your component uses dependency in src/SelectizeAsset.php
'yii\bootstrap\BootstrapAsset'
Is it possible to remove this dependency or make it optional?
PS: also it would be great to be able to disconnect/change (in src/SelectizeAsset.php) css-file
'css/selectize.bootstrap3.css'
Hi,
I encountered the same problem and eventually came to a solution. You can extend the component and the assets file. Then call your own asset file in the registerClientScript() method of the component and override the original assets call doing:
public function init()
{
parent::init();
// resetting BootstrapAsset to not load own css and js files
\Yii::$app->assetManager->bundles['yii\\bootstrap\\BootstrapAsset'] = [
'css' => [],
'js' => []
];
}