Answer the question
In order to leave comments, you need to log in
How to make it so that the data does not go beyond the page in the widget?
I am using demos.krajee.com/grid widget. It turns out that in the description the text is not transferred, but goes and completely expands the page. I tried different methods, but nothing works. Maybe someone faced this problem
Here is a screenshot of what happened
And here is my code
<?= GridView::widget([
'dataProvider' => $dataProviderWork,
'floatHeader' => true,
'pjax' => true,
'tableOptions' => ['class' => 'table table-bordered'],
'striped' => false,
'hover'=>true,
'columns' => [
[
'class'=>'kartik\grid\ExpandRowColumn',
'width'=>'50px',
'value' => function ($model, $key, $index) {
return GridView::ROW_COLLAPSED;
},
'detail'=>function ($model, $key, $index, $column) {
$model;
return Yii::$app->controller->renderPartial('_zakaz', ['model'=>$model]);
},
'enableRowClick' => true,
'expandOneOnly' => true,
],
[
'attribute' => 'id_zakaz',
'headerOptions' => ['width' => '20'],
'value' => 'prefics',
],
[
'attribute' => 'description',
'contentOptions'=>['style'=>'white-space: normal;'],
],
...
],
]); ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question