Skip to content

Commit

Permalink
Hide copy to clipboard if input is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
rawilk committed Jan 22, 2024
1 parent f55d335 commit 9c3bc7b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Actions/CopyToClipboardAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,15 @@ public static function getDefaultName(): ?string
{
return 'copyToClipboard';
}

public function isHidden(): bool
{
$isHidden = parent::isHidden();

if ($isHidden) {
return true;
}

return $this->getComponent()->isDisabled();
}
}

0 comments on commit 9c3bc7b

Please sign in to comment.