File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Change Log: `yii2-widget-select2`
66** Date:** _ under development_
77
88- (enh #348 ): Standardize Krajee theme for each BS version & other style enhancements.
9+ - (bug #350 ): Some options do not work when ` hashVarLoadPosition ` is ` View::POS_READY ` .
910
1011## Version 2.2.3
1112
Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ public function registerAssets()
457457 $ this ->_s2OptionsVar = 's2options_ ' .hash ('crc32 ' , $ options );
458458 $ this ->options ['data-s2-options ' ] = $ this ->_s2OptionsVar ;
459459 $ view = $ this ->getView ();
460- $ view ->registerJs ("var {$ this ->_s2OptionsVar } = {$ options }; " , $ this ->hashVarLoadPosition );
460+ $ view ->registerJs ("window. {$ this ->_s2OptionsVar } = {$ options }; " , $ this ->hashVarLoadPosition );
461461 if ($ this ->maintainOrder ) {
462462 $ val = Json::encode (is_array ($ this ->value ) ? $ this ->value : [$ this ->value ]);
463463 $ view ->registerJs ("initS2Order(' {$ id }', {$ val }); " );
You can’t perform that action at this time.
0 commit comments