From 90c02f71c4f41910faf2b61388adf1023b384ebe Mon Sep 17 00:00:00 2001 From: Simon Karlen Date: Tue, 3 Aug 2021 09:40:15 +0200 Subject: [PATCH] fixed tab nav (bs-toggle instead of toggle) --- src/Tabs.php | 2 +- tests/TabsTest.php | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Tabs.php b/src/Tabs.php index 8d17c0e..ee9d6e0 100644 --- a/src/Tabs.php +++ b/src/Tabs.php @@ -195,7 +195,7 @@ class Tabs extends Widget ArrayHelper::setValue($items[$n], 'options', $headerOptions); if (!isset($item['url'])) { ArrayHelper::setValue($items[$n], 'url', '#' . $options['id']); - ArrayHelper::setValue($items[$n], 'linkOptions.data.toggle', 'tab'); + ArrayHelper::setValue($items[$n], 'linkOptions.data.bs-toggle', 'tab'); ArrayHelper::setValue($items[$n], 'linkOptions.role', 'tab'); ArrayHelper::setValue($items[$n], 'linkOptions.aria.controls', $options['id']); if (!$disabled) { diff --git a/tests/TabsTest.php b/tests/TabsTest.php index ff84619..f42b98e 100644 --- a/tests/TabsTest.php +++ b/tests/TabsTest.php @@ -180,19 +180,19 @@ class TabsTest extends TestCase ]); $this->assertContains( - '', + '', $html ); $this->assertContains( - '', + '', $html ); $this->assertContains( - '', + '', $html ); $this->assertContains( - 'DisabledItem', + 'DisabledItem', $html ); $this->assertContains( @@ -271,15 +271,15 @@ class TabsTest extends TestCase ]); $this->assertNotContains( - '', + '', $html ); $this->assertNotContains( - '', + '', $html ); $this->assertContains( - '', + '', $html ); } @@ -310,7 +310,7 @@ class TabsTest extends TestCase ] ]); $this->assertContains( - '', + '', $html ); } @@ -362,8 +362,8 @@ class TabsTest extends TestCase ]); $expected = << - +
Content 1
Content 2
HTML; @@ -396,8 +396,8 @@ HTML; ]); $expected = << - +
Content 1
Content 2