From 0d6816329223b26f98c03dc7f1f7d5e11f97cc76 Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Fri, 12 May 2023 12:10:25 -0400 Subject: [PATCH] Landing page accordions no longer collapse when opening a new one --- phpunit.xml.dist | 7 ++----- src/PHPFUI/InstaDoc/Section/Home.php | 1 + src/PHPFUI/InstaDoc/Section/Landing.php | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 36dd577..fd766d7 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,12 +1,9 @@ add($parsedown->fileText($file)); } $accordion = new \PHPFUI\Accordion(); + $accordion->addAttribute('data-multi-expand', 'true'); $accordion->addAttribute('data-allow-all-closed', 'true'); $container->add(new \PHPFUI\SubHeader('Package Documentation')); diff --git a/src/PHPFUI/InstaDoc/Section/Landing.php b/src/PHPFUI/InstaDoc/Section/Landing.php index 3c209fd..46ee688 100644 --- a/src/PHPFUI/InstaDoc/Section/Landing.php +++ b/src/PHPFUI/InstaDoc/Section/Landing.php @@ -17,6 +17,7 @@ public function generate(\PHPFUI\InstaDoc\PageInterface $page, string $namespace if (\count($files)) { $accordion = new \PHPFUI\Accordion(); + $accordion->addAttribute('data-multi-expand', 'true'); $accordion->addAttribute('data-allow-all-closed', 'true'); $container->add(new \PHPFUI\SubHeader('Package Documentation'));