From a0755e07359ca01fa712872b91fcd06d3bd0f8c9 Mon Sep 17 00:00:00 2001 From: Anatoliy Date: Wed, 10 Jan 2018 21:44:01 +0300 Subject: [PATCH] remove SELECT from query for asDropDownList=true if asDropDownList=true then widget generate a INPUT --- src/widgets/TbSelect2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/TbSelect2.php b/src/widgets/TbSelect2.php index 883f3744..1286c9c9 100644 --- a/src/widgets/TbSelect2.php +++ b/src/widgets/TbSelect2.php @@ -145,7 +145,7 @@ public function registerClientScript($id) { } ob_start(); - echo "jQuery('select#{$id}').select2({$options})"; + echo "jQuery('#{$id}').select2({$options})"; foreach ($this->events as $event => $handler) { echo ".on('{$event}', " . CJavaScript::encode($handler) . ")"; }