Add proper copy to clipboard
This commit is contained in:
@@ -91,7 +91,12 @@ export class Tree extends React.Component<Props, TreeState> {
|
||||
}
|
||||
|
||||
public render() {
|
||||
return <Typography>
|
||||
const style: React.CSSProperties = {
|
||||
lineHeight: '1.1',
|
||||
cursor: 'default',
|
||||
}
|
||||
|
||||
return <Typography style={ style }>
|
||||
<TreeNode
|
||||
animateChages={true}
|
||||
autoExpandLimit={3000}
|
||||
|
||||
@@ -174,7 +174,7 @@ class TreeNode extends React.Component<TreeNodeProps, TreeNodeState> {
|
||||
return {}
|
||||
}
|
||||
const isInViewPort = this.titleRef.current && isElementInViewport(this.titleRef.current)
|
||||
const isDirty = this.dirtyMessage || this.dirtyEdges || this.collapsed()
|
||||
const isDirty = this.dirtyMessage || this.dirtyEdges
|
||||
if (this.props.animateChages && isDirty && isInViewPort) {
|
||||
if (!this.cssAnimationWasSetAt) {
|
||||
this.cssAnimationWasSetAt = performance.now()
|
||||
|
||||
@@ -37,7 +37,13 @@ class TreeNodeTitle extends React.Component<TreeNodeProps, {}> {
|
||||
onClick={() => {
|
||||
this.toggle()
|
||||
this.props.didSelectNode && this.props.didSelectNode(this.props.treeNode)
|
||||
}}>
|
||||
}}
|
||||
onMouseOver={() => {
|
||||
if (this.props.treeNode.message) {
|
||||
this.props.didSelectNode && this.props.didSelectNode(this.props.treeNode)
|
||||
}
|
||||
}}
|
||||
>
|
||||
{this.renderExpander()} {this.renderSourceEdge()} {this.renderCollapsedSubnodes()} {this.renderValue()}
|
||||
</span>
|
||||
}
|
||||
@@ -66,7 +72,6 @@ class TreeNodeTitle extends React.Component<TreeNodeProps, {}> {
|
||||
return this.props.treeNode.message
|
||||
? <span
|
||||
style={style}
|
||||
onMouseOver={() => this.props.didSelectNode && this.props.didSelectNode(this.props.treeNode)}
|
||||
> = {this.props.treeNode.message.value.toString()}</span>
|
||||
: null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user