kartik-v/yii2-tabs-x

Why linkOptions in TabsX:widget not working?

BakytzhanAkzhol opened this issue · 2 comments

I have trouble with download photos over AJAX TabsX . The information comes in, but the tab is not shown.
in index.php

 [
        'label'=>Yii::t('app','Фото'),
        'encode'=>false,
        'linkOptions'=>['data-url'=>\yii\helpers\Url::to(['organizations-photo/show','org_id'=>$model->id])]
    ],

Link is responded and send data.But, not show in tabs.
In the OrganizationsPhotoController

public function actionShow($org_id){
        $models=OrganizationsPhoto::find()->where(['org_id'=>$org_id])->all();
        $str='<div class="row">';
        foreach($models as $model){
            $str.='<div class="col-md-2">';
            $str.=$model->getPreviewIcon();
            $str.='</div>';
        }
        $str.="</div>";
        return $str;
    }

return Json::encode($str);

Thanks, man