diff --git a/src/BootstrapWidgetTrait.php b/src/BootstrapWidgetTrait.php index eab0d85..7070da8 100644 --- a/src/BootstrapWidgetTrait.php +++ b/src/BootstrapWidgetTrait.php @@ -92,10 +92,7 @@ trait BootstrapWidgetTrait $view = $this->getView(); BootstrapPluginAsset::register($view); // 'popover', 'toast' and 'tooltip' plugins not activates via data attributes - if ( - $this->clientOptions !== false - || in_array($name, ['popover', 'toast', 'tooltip'], true) - ) { + if ($this->clientOptions !== false || in_array($name, ['popover', 'toast', 'tooltip'], true)) { $name = ucfirst($name); $id = $this->options['id']; $options = empty($this->clientOptions) ? '{}' : Json::htmlEncode($this->clientOptions); diff --git a/src/Button.php b/src/Button.php index 19c0aa2..3b12796 100644 --- a/src/Button.php +++ b/src/Button.php @@ -59,6 +59,7 @@ class Button extends Widget */ public function run(): string { + $this->registerPlugin('button'); return Html::tag( $this->tagName, $this->encodeLabel ? Html::encode($this->label) : $this->label,