Hi,
When setting $summary to something, GridView does not generate the containing HTML tag defined in $summaryOptions. So in the following example:
<?php
echo GridView::widget([
'dataProvider' => $dataProvider,
'summary'=>'Displaying <b>{begin}</b>-<b>{end}</b> of <b>{totalCount}</b>.',
// ...
]);
?>
One would expect to have a HTML code of, for example,
<div class="summary">Displaying <b>1-20</b> of <b>24</b>.</div>
[size="2"] but instead it gives only [/size]
Displaying <b>1-20</b> of <b>24</b>.
thus[size="2"] omitting the <DIV> tag.[/size]
[size="2"]Looking at the code of the [/size]yii\widgets\BaseListView, the function renderSummary() starting at line 180 does not use
Html::tag($tag, ..., $summaryOptions);
when $summary is not NULL.
So I think the last return section of the code (starting at line 222) should be:
return Html::tag($tag,Yii::$app->getI18n()->format(/*...*/), $summaryOptions);
instead of only
return Yii::$app->getI18n()->format(/*...*/);
Is this intended (can someone explain why?) or is it a bug?
Thanks.
Rabb