Hint Action - Copy value
I wanna add a hint action to a
This is what I got so far:
This already show the button and on click it
Just to understand, what I wanna achieve: Later I will change it to
so that I can import/export the Builder value.
Builder field, which should copy the $state into the browser clipboard.This is what I got so far:
This already show the button and on click it
dd's the json of the Builder field state. But how to copy the value to clipboard, instead of dding? How can I call JS navigator.clipboard.writeText(copyText.value);?Just to understand, what I wanna achieve: Later I will change it to
so that I can import/export the Builder value.
Solution
Try this plugin.
https://github.com/webbingbrasil/filament-copyactions
If you need a one off simple solution, you may take some inspiration from this trait from above package
https://github.com/webbingbrasil/filament-copyactions/blob/3.x/src%2FConcerns%2FHasCopyable.php
https://github.com/webbingbrasil/filament-copyactions
If you need a one off simple solution, you may take some inspiration from this trait from above package
https://github.com/webbingbrasil/filament-copyactions/blob/3.x/src%2FConcerns%2FHasCopyable.php
GitHub
A easy-to-use copy actions for Filament Admin Pages, Tables and Form Fields. - webbingbrasil/filament-copyactions
GitHub
A easy-to-use copy actions for Filament Admin Pages, Tables and Form Fields. - webbingbrasil/filament-copyactions