【发布时间】:2017-09-20 16:28:39
【问题描述】:
查看代码:
[
'attribute' => 'name',
'filterType'=>GridView:: FILTER_SELECT2,
'filter'=>ArrayHelper::map(\app\models\Item::find()->orderBy('category')->asArray()->all(), 'name', 'name'),
'filterWidgetOptions'=>[
'pluginOptions'=>['allowClear'=>true, 'minimuminputLength' => 3],
],
'filterInputOptions'=>['placeholder'=>'Any Item', 'multiple' => true ],
'group'=>true, // enable grouping
'label' => 'Item',
'contentOptions' =>
['style'=>'max-width: 150px; font-size: 12px;overflow: auto; word-wrap: break-word;'],
],
该代码有效,但标签值应该是从列表中选择的项目名称值,而我想要的是我可以为标签过滤器/搜索键入任何单词,而不是我应该从列表中选择值。 谢谢你
【问题讨论】:
标签: gridview yii2 tags jquery-select2