Skip to content

Commit

Permalink
Collapse: allow to collapse all (#392)
Browse files Browse the repository at this point in the history
By default, the daisyUI structure for Accordion uses radio. So, a least one item should be selected.

We are changing this to allow to collapse all items.
  • Loading branch information
robsontenorio committed Apr 26, 2024
1 parent 1177bed commit 909ddcd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/View/Components/Collapse.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ public function render(): View|Closure|string
<input {{ $attributes->wire('model') }} type="checkbox" />
@endif
<div {{ $heading->attributes->merge(["class" => "collapse-title text-xl font-medium"]) }}>
<div
{{ $heading->attributes->merge(["class" => "collapse-title text-xl font-medium"]) }}
@if(isset($noJoin))
:class="model == '{{ $name }}' && 'z-10'"
@click="if (model == '{{ $name }}') model = null"
@endif
>
{{ $heading }}
</div>
<div {{ $content->attributes->merge(["class" => "collapse-content"]) }} wire:key="content-{{ $uuid }}">
Expand Down

0 comments on commit 909ddcd

Please sign in to comment.