active tab control according to url
This commit is contained in:
parent
3c0978fad2
commit
a8730e6ea3
@ -1,6 +1,6 @@
|
|||||||
@props(['active'])
|
@props(['active'])
|
||||||
|
|
||||||
<div x-data="{ active: '{{ $active }}' }">
|
<div x-data="{ active: window.location.hash.split('#')[1] == undefined ? '{{ $active }}' : window.location.hash.split('#')[1] }">
|
||||||
<div>
|
<div>
|
||||||
<ul {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'flex items-center']) : $attributes }}>
|
<ul {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'flex items-center']) : $attributes }}>
|
||||||
{!! $navs !!}
|
{!! $navs !!}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user