yiisoft / yii-dataview

Data widgets
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
39 stars 21 forks source link

Allow Closure as a valid parameter for `ListView::itemViewAttributes`. #211

Closed glpzzz closed 2 months ago

glpzzz commented 2 months ago
          > @samdark @vjik what do you think about allowing `ListView::itemViewAttributes()` to also accept a Closure so the `li` (or other item tag) could be customized according to the specific item?

I agree with @samdark. See as example: https://github.com/yiisoft/yii-dataview/blob/848da41ead3407cea7a3647e8db66058d9a33708/src/GridView.php#L705

Suggest implement it in separate PR only.

Originally posted by @vjik in https://github.com/yiisoft/yii-dataview/issues/210#issuecomment-2336597346