Why linkOptions in TabsX:widget not working?
BakytzhanAkzhol opened this issue · 2 comments
BakytzhanAkzhol commented
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;
}
Boco10 commented
return Json::encode($str);
BakytzhanAkzhol commented
Thanks, man