From a59166bc37f3bed4d1a527945f017a72fe86706d Mon Sep 17 00:00:00 2001 From: Kartik Visweswaran Date: Tue, 16 Jun 2015 09:48:25 +0530 Subject: [PATCH] Fix #49: Allow custom tags to be added for both single select and multiple select --- CHANGE.md | 1 + Select2.php | 4 +--- composer.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGE.md b/CHANGE.md index ffaa70b..0d8e006 100644 --- a/CHANGE.md +++ b/CHANGE.md @@ -8,6 +8,7 @@ version 2.0.1 - (bug #42): Fix plugin bug that prevents clearing Select2 input correctly. - (enh #43): Code style and formatting fixes. - (enh #44): Trigger custom event `krajeeselect2:cleared`. +- (enh #49): Allow custom tags to be added for both single select and multiple select. version 2.0.0 ============= diff --git a/Select2.php b/Select2.php index 9a35e85..d9a91b3 100644 --- a/Select2.php +++ b/Select2.php @@ -114,9 +114,7 @@ public function init() } $multiple = ArrayHelper::getValue($this->pluginOptions, 'multiple', false); unset($this->pluginOptions['multiple']); - $multiple = ArrayHelper::getValue($this->pluginOptions, 'tags', false) ? true : - ArrayHelper::getValue($this->options, 'multiple', $multiple); - $this->options['multiple'] = $multiple; + $this->options['multiple'] = ArrayHelper::getValue($this->options, 'multiple', $multiple); if ($this->hideSearch) { $css = ArrayHelper::getValue($this->pluginOptions, 'dropdownCssClass', ''); $css .= ' kv-hide-search'; diff --git a/composer.json b/composer.json index ee1f7b3..fbbe4a9 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "kartik-v/yii2-krajee-base": "*" + "kartik-v/yii2-krajee-base": "~1.7" }, "autoload": { "psr-4": {