Skip to content

Commit

Permalink
DetailsActions: Only add data-action-item attr if list is an `.acti…
Browse files Browse the repository at this point in the history
…on-list`
  • Loading branch information
sukhwinder33445 committed Sep 12, 2023
1 parent 52c7773 commit a2da532
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/Icingadb/Common/DetailActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ public function addMultiselectFilterAttribute(BaseHtmlElement $element, Filter\R
public function addDetailFilterAttribute(BaseHtmlElement $element, Filter\Rule $filter): self
{
$element->getAttributes()
->set('data-action-item', true)
->registerAttributeCallback('data-action-item', function () {
return ! $this->getDetailActionsDisabled();
})
->registerAttributeCallback('data-icinga-detail-filter', function () use ($filter) {
return $this->getDetailActionsDisabled() ? null : QueryString::render($filter);
});
Expand Down

0 comments on commit a2da532

Please sign in to comment.