Hello!
I'm want to copy to clipboard the value of a column by clicking on this value. But in the documentation I didn't find how to use javascript in "wrapper". Any examples?
When I run php artisan backpack:version the output is:
Hello there! Thanks for opening your first issue on this repo!
Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps _a lot_ in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.
Backpack communication channels:
backpack-for-laravel tag;Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome _awesome_ community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.
Thank you!
--
Justin Case
The Backpack Robot
You probably mean the list view,
To copy column content to the clipboard you should add some custom javascript
This can be done using the list.js file, details here
Here is an example of the js code, https://stackoverflow.com/a/48927455 make sure you adjust element selector. Then it should work.
For more questions please ask them on stackoverflow or another channel.
Thanks @martijnb92 for pitching in.
I would just add that you can pass a string or a function to the wrapper.
Something like:
'onClick' => "(function(){
alert('Hey i am calling');
return false;
})();return false;";
Not sure this is the solution that you need, it might need more work that adding js into the wrapper.
Best,
Pedro
Most helpful comment
You probably mean the list view,
To copy column content to the clipboard you should add some custom javascript
This can be done using the
list.jsfile, details hereHere is an example of the js code, https://stackoverflow.com/a/48927455 make sure you adjust element selector. Then it should work.
For more questions please ask them on stackoverflow or another channel.