Copy to Clipboard Inside Custom Livewire Form
Hey guys,
I'm trying to do something really simple but for some reason it is not working.
I have a list of variables that I need to show in some views, and this list is copyable, so when user click in a LI, copy to clipboard and show a notification.
It works as a charm when I'm using this script inside an view, and doesn't works in other.
One is just a list with LI and other is a dropdown, that when click on item, must copy.
Both are executing "Notification" from filament, but one copy, other none.
Solution:Jump to solution
The problem is when using x-filament::dropdown.list.item, if I remove and put a List item, works.
2 Replies
Here works:
Here doesn't work
Basically the same code, both calling wire:click="$dispatch('copy-to-clipboard', '{{ $item }}')"
Both are showing the notification:
Solution
The problem is when using x-filament::dropdown.list.item, if I remove and put a List item, works.