Yii echmultiselect showing error on console and not working

落花浮王杯 提交于 2020-06-01 07:41:06

问题


I was following the Option no 3 here https://www.yiiframework.com/extension/echmultiselect#3-use-as-a-filter-in-cgridview to add multiselect dropdown on my Yii project. But it is showing,

jquery.js:6920 Uncaught TypeError: jQuery.easing[this.easing] is not a function at init.run (jquery.js:6920)

On my cgridview, this is the column that has to be multiple select checkbox,

array (
                'name'=>'brand_id',
                'filter'=> $this->widget('ext.EchMultiSelect.EchMultiSelect', array(
                    'model' => $model,
                    'dropDownAttribute' => 'brand_id',
                    'data' => CHtml::listData(Brands::model()->findAll(array("order" => "sortOrder")), 'id', 'name'),
                    'options' => array('buttonWidth' => 80, 'ajaxRefresh' => true,'filter'=>true),
                ),
                    true // capture output; needed so the widget displays inside the grid
                ),
           ),

On my layout,

I've included the jquery,

<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>

Dropdown page:

Because of that jQuery.easing[this.easing] is not a function error the multi-select functionality is not working, as per the suggestion here: https://stackoverflow.com/a/12592301/1138192 I've added the jquery UI also but it doesn't work even it breaks the existing dropdown.

Error on the console:


回答1:


The problem is in jquery.multiselect.js (EchMultiSelect-v1.3) as the effect method arguments are inverted (at least for the current jQuery version):

.show( effect, speed ) and .hide( effect, speed ) on lines 566, 573, 600 should be replaced by the correct order .show( speed, effect ) and .hide( speed, effect ).



来源:https://stackoverflow.com/questions/62064671/yii-echmultiselect-showing-error-on-console-and-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!