Allow copying from whole row
Summary: Increase the mouse target for copying values from the the tree in a data inspector to the full row, not just the text. Not sure if bringing reversing the order here has any unintended side-effects, but in testing it seems to work fine. Reviewed By: mweststrate Differential Revision: D28185064 fbshipit-source-id: b9b86a7e181bfd0083f2a3bcb24c571b5ec4647e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d02951e8e9
commit
bf571065f9
@@ -43,6 +43,7 @@ const BaseContainer = styled.div<{depth?: number; disabled?: boolean}>(
|
|||||||
margin: props.depth === 0 ? '7.5px 0' : '0',
|
margin: props.depth === 0 ? '7.5px 0' : '0',
|
||||||
paddingLeft: 10,
|
paddingLeft: 10,
|
||||||
userSelect: 'text',
|
userSelect: 'text',
|
||||||
|
width: '100%',
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
BaseContainer.displayName = 'DataInspector:BaseContainer';
|
BaseContainer.displayName = 'DataInspector:BaseContainer';
|
||||||
@@ -606,19 +607,19 @@ export const DataInspectorNode: React.FC<DataInspectorProps> = memo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseContainer
|
<Dropdown overlay={getContextMenu} trigger={contextMenuTrigger}>
|
||||||
depth={depth}
|
<BaseContainer
|
||||||
disabled={!!setValueProp && !!setValue === false}>
|
depth={depth}
|
||||||
<Dropdown overlay={getContextMenu} trigger={contextMenuTrigger}>
|
disabled={!!setValueProp && !!setValue === false}>
|
||||||
<PropertyContainer onClick={isExpandable ? handleClick : undefined}>
|
<PropertyContainer onClick={isExpandable ? handleClick : undefined}>
|
||||||
{expandedPaths && <ExpandControl>{expandGlyph}</ExpandControl>}
|
{expandedPaths && <ExpandControl>{expandGlyph}</ExpandControl>}
|
||||||
{descriptionOrPreview}
|
{descriptionOrPreview}
|
||||||
{wrapperStart}
|
{wrapperStart}
|
||||||
</PropertyContainer>
|
</PropertyContainer>
|
||||||
</Dropdown>
|
{propertyNodesContainer}
|
||||||
{propertyNodesContainer}
|
{wrapperEnd}
|
||||||
{wrapperEnd}
|
</BaseContainer>
|
||||||
</BaseContainer>
|
</Dropdown>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
dataInspectorPropsAreEqual,
|
dataInspectorPropsAreEqual,
|
||||||
|
|||||||
Reference in New Issue
Block a user