File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -160,13 +160,22 @@ private function renderButtons()
160
160
$ buttons = '' ;
161
161
162
162
foreach ($ this ->items as $ value => $ label ) {
163
- $ buttons .= Html::button ($ label , [
164
- 'data-value ' => $ value ,
165
- 'class ' => $ this ->getButtonClass (
166
- $ value ,
167
- $ this ->hasModel () ? Html::getAttributeValue ($ this ->model , $ this ->attribute ) : $ this ->value
168
- ),
169
- ]);
163
+ $ buttonOptions = ArrayHelper::merge (
164
+ [
165
+ 'data-value ' => $ value ,
166
+ 'class ' => $ this ->getButtonClass (
167
+ $ value ,
168
+ $ this ->hasModel ()
169
+ ? Html::getAttributeValue ($ this ->model , $ this ->attribute )
170
+ : $ this ->value
171
+ ),
172
+ ],
173
+ isset ($ this ->itemOptions ['buttons ' ][$ value ]) ? $ this ->itemOptions ['buttons ' ][$ value ] : []
174
+ );
175
+ ArrayHelper::remove ($ buttonOptions , self ::STATE_ACTIVE );
176
+ ArrayHelper::remove ($ buttonOptions , self ::STATE_DEFAULT );
177
+
178
+ $ buttons .= Html::button ($ label , $ buttonOptions );
170
179
}
171
180
172
181
$ class = 'btn-group checkbox-button-group ' ;
You can’t perform that action at this time.
0 commit comments