@@ -473,7 +473,7 @@ protected function renderRadioList($name, $value, $options)
473
473
'label ' => $ label ,
474
474
'value ' => $ value ,
475
475
'data-id ' => ArrayHelper::getValue ($ options , 'id ' ),
476
- 'tabindex ' => $ options [ ' tabindex ' ]
476
+ 'tabindex ' => self :: TABINDEX
477
477
]);
478
478
479
479
return Html::tag ('div ' , $ content , ['class ' => 'radio ' ]);
@@ -534,7 +534,7 @@ protected function renderCheckboxList($name, $value, $options)
534
534
'label ' => $ label ,
535
535
'value ' => $ value ,
536
536
'data-id ' => ArrayHelper::getValue ($ options , 'id ' ),
537
- 'tabindex ' => $ options [ ' tabindex ' ]
537
+ 'tabindex ' => self :: TABINDEX
538
538
]);
539
539
540
540
return Html::tag ('div ' , $ content , ['class ' => 'checkbox ' ]);
@@ -633,9 +633,9 @@ protected function renderDefault($name, $value, $options)
633
633
*/
634
634
protected function renderWidget ($ type , $ name , $ value , $ options )
635
635
{
636
- if (! isset ( $ options [ ' tabindex ' ])) {
637
- $ options ['tabindex ' ] = self ::TABINDEX ;
638
- }
636
+
637
+ $ tabindex = isset ( $ options [ ' options ' ][ ' tabindex ' ]) ? $ options ['options ' ][ ' tabindex ' ] : self ::TABINDEX ;
638
+ unset( $ options [ ' tabindex ' ]);
639
639
640
640
$ model = $ this ->getModel ();
641
641
if ($ model instanceof Model) {
@@ -646,7 +646,7 @@ protected function renderWidget($type, $name, $value, $options)
646
646
'options ' => [
647
647
'id ' => $ this ->normalize ($ name ),
648
648
'name ' => $ name ,
649
- 'tabindex ' => $ options [ ' tabindex ' ] ,
649
+ 'tabindex ' => $ tabindex ,
650
650
'value ' => $ value
651
651
]
652
652
];
@@ -657,7 +657,7 @@ protected function renderWidget($type, $name, $value, $options)
657
657
'options ' => [
658
658
'id ' => $ this ->normalize ($ name ),
659
659
'name ' => $ name ,
660
- 'tabindex ' => $ options [ ' tabindex ' ] ,
660
+ 'tabindex ' => $ tabindex ,
661
661
'value ' => $ value
662
662
]
663
663
];
0 commit comments