I define a cell of table by below script:
'attribute' => 'status',
'format' => 'html',
'value' => function ($model) use ($bgStatus) {
$status = Constant::$status['background'][$model->status];
return Html::tag('span', $status, ['class'=>'label '.$bgStatus[$status], 'data'=>['id'=>'1', 'ds'=>'123']]);
},
'label' => 'Status'
And no have any changes. I'm looking for the span tag will contain property as
data-id="1" data-ds="123"
What are my wrongs?