Inline parameter is ignored in checkboxList and radioList
Renkas opened this issue · 1 comments
Renkas commented
These lines should be changed:
yii2-bootstrap5/src/ActiveField.php
Line 343 in bba225c
yii2-bootstrap5/src/ActiveField.php
Line 385 in bba225c
From this:
$wrapperOptions = ArrayHelper::remove($options, 'wrapperOptions', ['class' => ['form-check']]);
To this:
$wrapperOptionsDefault = ['class' => ['form-check']];
if ($this->inline) {
Html::addCssClass($wrapperOptionsDefault, 'form-check-inline');
}
$wrapperOptions = ArrayHelper::remove($options, 'wrapperOptions', $wrapperOptionsDefault);
Sorry I don't have the time to create a pull request at this time myself.
Renkas commented
Why did you implement it that way? Instead of the example I gave here? Your implementation does not give user the possibility to use their own classes exclusively. It will always add default form-check-inline
when using inline.