Skip to content

Commit

Permalink
fix popover in table
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Mar 5, 2024
1 parent 3e782ac commit a9c4885
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions resources/views/popover-column.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
x-data="{ open: false }"

@if($getTrigger === 'hover')
@pointerleave="clearTimeout($time); open = false"
@else
@click.away="open = false"
@pointerleave="$refs.panel.close"
@endif

class="fi-popover fi-ta-text grid w-full gap-y-1 px-3 py-4"
Expand All @@ -38,9 +36,9 @@ class="fi-popover fi-ta-text grid w-full gap-y-1 px-3 py-4"
class="relative w-full fi-popover-trigger cursor-pointer flex items-center gap-2"
x-ref="button"
@if($getTrigger === 'hover')
@pointerenter="$time = setTimeout(() => { open = true }, 200)"
@pointerenter="$refs.panel.open"
@else
@click="open = ! open"
@click="$refs.panel.toggle"
@endif
>
{{ $getState }}
Expand All @@ -53,10 +51,12 @@ class="h-5 w-5 text-gray-500 dark:text-gray-400"
@endif
</div>

<div class="z-50 fi-popover-content w-[{{ $getPopOverMaxWidth }}px] border border-gray-100 rounded-lg shadow-lg bg-white dark:bg-gray-800"
x-cloak x-trap="open"
x-show="open"
x-anchor.{{ $getPlacement }}.offset.{{ $getOffset }}="$refs.button"
<div class="z-50 fi-popover-content w-[{{ $getPopOverMaxWidth }}px] border border-gray-100 rounded-lg shadow-lg bg-white dark:bg-gray-800 transition"
x-cloak
x-ref="panel"
x-transition:enter-start="opacity-0"
x-transition:leave-end="opacity-0"
x-float.placement.bottom-end.flip.teleport.offset="{ offset: 8 }"
>
{{ $getContent }}
</div>
Expand Down

0 comments on commit a9c4885

Please sign in to comment.