Skip to content

Commit

Permalink
change open() method
Browse files Browse the repository at this point in the history
  • Loading branch information
bald-cat committed Jan 24, 2025
1 parent e5c2c36 commit 153b971
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/Screen/Layouts/Accordion.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ abstract class Accordion extends Layout
*/
protected $template = 'platform::layouts.accordion';

/**
* @var bool
*/
private $openSet = false;

/**
* @var array
*/
Expand Down Expand Up @@ -73,13 +68,7 @@ public function stayOpen(bool $stayOpen = true): self
*/
public function open(string|array $activeAccordion): self
{
$activeAccordion = Arr::wrap($activeAccordion);

$this->variables['open'] = $this->openSet
? array_merge($this->variables['open'], $activeAccordion)
: $activeAccordion;

$this->openSet = true;
$this->variables['open'] = Arr::wrap($activeAccordion);

return $this;
}
Expand Down

0 comments on commit 153b971

Please sign in to comment.