kartik-v / yii2-widgets

Collection of useful widgets for Yii Framework 2.0
http://demos.krajee.com/widgets
Other
558 stars 175 forks source link

Select2 Widget + maintainOrder=>true + multiple => true not maintain order when update #295

Closed wilsonfalai closed 8 years ago

wilsonfalai commented 8 years ago

On documentations says: echo Select2::widget([ 'name' => 'color_2', 'value' => ['red', 'green'], // initial value 'data' => $data, 'maintainOrder' => true, 'options' => ['placeholder' => 'Select a color ...', 'multiple' => true], 'pluginOptions' => [ 'tags' => true, 'maximumInputLength' => 10 ], ]); But if i set the opposite ['green','red',] on select2 view show firt red and after green(ordered by name). Not maintain order

kartik-v commented 8 years ago

Check if you have the updated code release and update to the latest dev-master release. This works fine on the dev-master release.