From bf571065f9096e3bc2144f37b33df17f11370384 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 4 May 2021 10:34:36 -0700 Subject: [PATCH] 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 --- .../src/ui/data-inspector/DataInspectorNode.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx b/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx index cc61f2421..6e2c96b79 100644 --- a/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx +++ b/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx @@ -43,6 +43,7 @@ const BaseContainer = styled.div<{depth?: number; disabled?: boolean}>( margin: props.depth === 0 ? '7.5px 0' : '0', paddingLeft: 10, userSelect: 'text', + width: '100%', }), ); BaseContainer.displayName = 'DataInspector:BaseContainer'; @@ -606,19 +607,19 @@ export const DataInspectorNode: React.FC = memo( } return ( - - + + {expandedPaths && {expandGlyph}} {descriptionOrPreview} {wrapperStart} - - {propertyNodesContainer} - {wrapperEnd} - + {propertyNodesContainer} + {wrapperEnd} + + ); }, dataInspectorPropsAreEqual,