kartik-v / yii2-editable

An enhanced editable widget for Yii 2.0 that allows easy editing of displayed data with html inputs, widgets and more.
http://demos.krajee.com/editable
Other
112 stars 55 forks source link

Editable close on remove one element from select2 #215

Closed Krakozaber closed 2 years ago

Krakozaber commented 2 years ago

Editable close on remove one element from select2.

GridView::widget([
    'dataProvider' => $dataProvider,
    'filterModel' => $searchModel,
    'columns' => [
        [
            'class' => EditableColumn::class,
            'attribute' => 'ids',
            'format' => 'raw',
            'value' => fn($model) => $model->values,
            'content' => fn($model) => $model->content,
            'contentOptions' => [
                'class' => 'container'
            ],
            'editableOptions' => [
                'formOptions' => [
                    'action' => ['editable']
                ],
                'preHeader' => '',
                'inputType' => Editable::INPUT_SELECT2,
                'options' => [
                    'id' => 'ids-id-p',
                    'data' => $select2Data,
                    'pluginOptions' => [
                        'dropdownParent' => '#ids-id-p-popover',
                        'multiple' => true,
                        'placeholder' => false,
                        'allowClear' => true,
                    ],
                    'options' => [
                        'name' => 'ids',
                        'options' => $select2Title
                    ]
                ],
            ]
        ],        
    ],
])
  1. Bootstrap 3
  2. kartik-v/yii2-grid v3.3.6
  3. kartik-v/yii2-editable v1.7.9
  4. kartik-v/yii2-select2 v2.2.2
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

gb5256 commented 11 months ago

@Krakozaber : Have you been able to solve this? I am now experiencing the same...