Skip to content

Commit 5d8c8e2

Browse files
author
Eugene Tupikov
committed
Use Html helper for rendering buttons instead of Button widget
1 parent 5636280 commit 5d8c8e2

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

src/renderers/TableRenderer.php

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,10 @@ private function renderActionColumn($index = null)
222222
private function renderAddButton()
223223
{
224224
$options = [
225-
'class' => 'multiple-input-list__btn js-input-plus',
225+
'class' => 'btn multiple-input-list__btn js-input-plus',
226226
];
227227
Html::addCssClass($options, $this->addButtonOptions['class']);
228-
return Button::widget(
229-
[
230-
'tagName' => 'div',
231-
'encodeLabel' => false,
232-
'label' => $this->addButtonOptions['label'],
233-
'options' => $options
234-
]
235-
);
228+
return Html::tag('div', $this->addButtonOptions['label'], $options);
236229
}
237230

238231
/**
@@ -244,17 +237,10 @@ private function renderAddButton()
244237
private function renderRemoveButton()
245238
{
246239
$options = [
247-
'class' => 'multiple-input-list__btn js-input-remove',
240+
'class' => 'btn multiple-input-list__btn js-input-remove',
248241
];
249242
Html::addCssClass($options, $this->removeButtonOptions['class']);
250-
return Button::widget(
251-
[
252-
'tagName' => 'div',
253-
'encodeLabel' => false,
254-
'label' => $this->removeButtonOptions['label'],
255-
'options' => $options
256-
]
257-
);
243+
return Html::tag('div', $this->removeButtonOptions['label'], $options);
258244
}
259245

260246
/**

0 commit comments

Comments
 (0)