mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Ensure Drawer copyTitle() copies everything after the first ':' (#4373)
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
2446b6cf9b
commit
1fad7a18f9
@ -147,9 +147,9 @@ export class Drawer extends React.Component<DrawerProps> {
|
||||
};
|
||||
|
||||
copyTitle = (title: string) => {
|
||||
const k8sObjName = title.split(":")[1] || title; // copy whole if no :
|
||||
const itemName = title.split(":").splice(1).join(":") || title; // copy whole if no :
|
||||
|
||||
clipboard.writeText(k8sObjName.trim());
|
||||
clipboard.writeText(itemName.trim());
|
||||
this.setState({ isCopied: true });
|
||||
setTimeout(() => {
|
||||
this.setState({ isCopied: false });
|
||||
|
||||
Loading…
Reference in New Issue
Block a user