F
Filamentβ€’8mo ago
Chriis

Copy to clipboard table row action

Hi, like said in the title, how can I copy record data to the clipboard with a table row action ? I know its possible with a Textcolumn but I don't want to show the entire url in the table ... Or maybe I could replace the URL text in the TextColumn but could still be able to copy the URL and not the placeholder text ?
9 Replies
ChesterS
ChesterSβ€’8mo ago
I don't know if you can apply the logic to the entire row, but you can change what gets copied using copyableState https://filamentphp.com/docs/3.x/tables/columns/color#customizing-the-text-that-is-copied-to-the-clipboard
Chriis
Chriisβ€’8mo ago
Yep, but I can't try it 😦 The copyable method is not working for me on tables and infolists
ChesterS
ChesterSβ€’8mo ago
Does it not work at all? You need a secure connection (https) for it to work BTW So it won't work locally probably (unless you have https in your local env)
Chriis
Chriisβ€’8mo ago
Oh really πŸ˜… Thats probably why I didnt knew that, thx I'm using Laragon so yeah its not https
ChesterS
ChesterSβ€’8mo ago
Yeah it's mentioned in passing here https://filamentphp.com/docs/3.x/tables/columns/text#allowing-the-text-to-be-copied-to-the-clipboard
This feature only works when SSL is enabled for the app.
but it's easy to miss
Chriis
Chriisβ€’8mo ago
Yep, my bad
toeknee
toekneeβ€’8mo ago
Checkout Herd or Valet for SSL Supported sites too.
Chriis
Chriisβ€’8mo ago
I'm not working on a mac 😬
toeknee
toekneeβ€’8mo ago
Opps, then see point 4: https://laragon.org/docs/easy-to-use.html πŸ™‚
Laragon - portable, isolated, fast & powerful universal development environment for PHP, Node.js, Python, Java, Go, Ruby.
Easy-to-use
Laragon has many features and they work for you out of the box. Furthermore, it is so easy that you can start using it without reading lengthy documentation.Some other features that make your life eas