Skip to content

Commit

Permalink
fix when display the value is null and can't copyable this value
Browse files Browse the repository at this point in the history
  • Loading branch information
xxl4 committed Dec 23, 2023
1 parent 1cd4cb0 commit 66b848e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Grid/Displayers/Copyable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ protected function addScript()
$script = <<<SCRIPT
$('#{$this->grid->tableID}').on('click','.grid-column-copyable',(function (e) {
var content = $(this).data('content');
console.log("Copyable");
console.log(content);
console.log($(this));
var temp = $('<input>');
Expand All @@ -37,6 +41,8 @@ public function display()

$content = $this->getColumn()->getOriginal();

// when display value, the copyable is don't get value todo

return <<<HTML
<a href="javascript:void(0);" class="grid-column-copyable text-muted" data-content="{$content}" title="Copied!" data-placement="bottom">
<i class="fa fa-copy"></i>
Expand Down

0 comments on commit 66b848e

Please sign in to comment.