From f5e28fc634f3e1c6112e7c61b97a59a913446aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enes=20Sacid=20B=C3=BCker?= <73346401+EnesSacid-Buker@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:30:27 +0300 Subject: [PATCH] Tabs component ignore hash option added --- resources/views/components/tabs/index.blade.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/views/components/tabs/index.blade.php b/resources/views/components/tabs/index.blade.php index f2d33fb8c..fb05cf596 100644 --- a/resources/views/components/tabs/index.blade.php +++ b/resources/views/components/tabs/index.blade.php @@ -8,7 +8,14 @@ } @endphp -
+
has('ignore-hash')) + x-data="{ active: window.location.hash.split('#')[1] == undefined ? '{{ $active }}' : window.location.hash.split('#')[1] }" + @else + x-data="{ active: '{{ $active }}' }" + @endif +>
    has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'inline-flex overflow-x-scroll large-overflow-unset']) : $attributes }}> {!! $navs !!}