igm26k/yii2-multiselect

yii2 双向选择小部件

v1.0.4 2021-08-10 09:31 UTC

This package is auto-updated.

Last update: 2024-09-10 16:50:11 UTC


README

这是基于 Flywi/yii2-multiselect 的分支,已加入修正。在这个版本中,可以正确地从模型加载值到右侧。

example

安装

$ php composer.phar require igm26k/yii2-multiselect

使用

ActiveForm:

...
echo $form->field($model, 'attributeId')->widget(\igm26k\select\MultiSelectWidget::class, [
    'data' => [
      // select options list(key => value)
    ],
    'clientOptions' => [
    
    ],
]);
...

客户端选项

clientOptions crlcu/multiselect