File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ Yii2 multiple input change log
5
5
---------------------
6
6
7
7
- Enh: increased default value for the property ` limit `
8
+ - Added support of associative array in data
8
9
9
10
1.2.16
10
11
------
@@ -142,4 +143,4 @@ Yii2 multiple input change log
142
143
1.0.0
143
144
-----
144
145
145
- first stable release
146
+ first stable release
Original file line number Diff line number Diff line change @@ -117,9 +117,11 @@ protected function renderBody()
117
117
if ($ this ->min === $ this ->limit && $ cnt < $ this ->limit ) {
118
118
$ cnt = $ this ->limit ;
119
119
}
120
+ $ keys = array_keys ($ this ->data );
120
121
for ($ i = 0 ; $ i < $ cnt ; $ i ++) {
121
- $ item = ArrayHelper::getValue ($ this ->data , $ i , null );
122
- $ rows [] = $ this ->renderRowContent ($ i , $ item );
122
+ $ key = ArrayHelper::getValue ($ keys , $ i , $ i );
123
+ $ item = ArrayHelper::getValue ($ this ->data , $ key , null );
124
+ $ rows [] = $ this ->renderRowContent ($ key , $ item );
123
125
}
124
126
} elseif ($ this ->min > 0 ) {
125
127
for ($ i = 0 ; $ i < $ this ->min ; $ i ++) {
You can’t perform that action at this time.
0 commit comments