generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
It currently seems to be impossible to use both ButtonGroup and button|resetButton|submitButton at the same time.
Yiisoft\Form\Field\ButtonGroup::buttons(): Argument #1 must be of type Yiisoft\Html\Tag\Button, Yiisoft\Form\Field\ResetButton given
This is problematic when attempting to use both themed ButtonGroup and Buttons at the same time.
'fieldConfigs' => [
ButtonGroup::class => [
'containerClass()' => ['btn-toolbar justify-content-end'],
'inputContainerClass()' => ['btn-group'],
],
ResetButton::class => [
'buttonClass()' => ['btn btn-secondary shadow'],
'content()' => [_('Reset')],
'inputContainerTag()' => [null],
'useContainer()' => [false],
],
SubmitButton::class => [
'buttonClass()' => ['btn btn-primary shadow'],
'content()' => [_('Submit')],
'inputContainerTag()' => [null],
'useContainer()' => [false],
],
],I propose this should be valid usage:
use Yiisoft\FormModel\Field;
echo Field::ButtonGroup()
->buttons(
Field::button(),
Field::resetButton(),
Field::submitButton()
);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels