Skip to content

Commit

Permalink
Do not add uniqueId to Action render
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk authored Mar 27, 2024
1 parent 359516c commit 0947cff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/UI/Actions/Controls/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public function __construct(
public function create(): Html
{
$label = $this->translator?->translate($this->label) ?? $this->label;
return $this->getControl()->addHtml($label)->setHref($this->link)
->setId($this->getUniqueId());
return $this->getControl()->addHtml($label)->setHref($this->link);
}


Expand Down
7 changes: 2 additions & 5 deletions src/UI/Actions/Controls/Dropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public function __construct(
public function create(): Html
{
$dropdownMenu = Html::el('div class="dropdown-menu"');
$button = $this->control->create()
->addClass('dropdown-toggle')
$button = $this->getControl()->addClass('dropdown-toggle')
->data('toggle', 'dropdown');

foreach ($this->getActions() as $action) {
Expand All @@ -57,9 +56,7 @@ public function create(): Html
}

return Html::el('div class="btn-group" role="group"')
->setId($this->getUniqueId())
->addHtml($button)
->addHtml($dropdownMenu);
->addHtml($button)->addHtml($dropdownMenu);
}


Expand Down

0 comments on commit 0947cff

Please sign in to comment.