@samitouri / QOS-React-2 / commits / 8d1c829019

Reverted style-prop hiding change because it caused a regression in the browser extension

Brian Vaughn committed Jul 24, 2019 at 15:48 UTC 8d1c82901942a67f51847c1e1dbedb1732f0bed6
1 file changed +1 -12
src/devtools/views/Components/SelectedElement.js
+1 -12
@@ -13,7 +13,6 @@ import InspectedElementTree from './InspectedElementTree';
13 import { InspectedElementContext } from './InspectedElementContext';
14 import ViewElementSourceContext from './ViewElementSourceContext';
15 import NativeStyleEditor from './NativeStyleEditor';
16 -import { NativeStyleContext } from './NativeStyleEditor/context';
16 import Toggle from '../Toggle';
17 import Badge from './Badge';
18 import {
@@ -264,7 +263,6 @@ function InspectedElementView({
263 const { ownerID } = useContext(TreeStateContext);
264 const bridge = useContext(BridgeContext);
265 const store = useContext(StoreContext);
267 - const { getStyleAndLayout } = useContext(NativeStyleContext);
266
267 const inspectContextPath = useCallback(
268 (path: Array<string | number>) => {
@@ -336,21 +334,12 @@ function InspectedElementView({
334 };
335 }
336
339 - let filteredProps = props;
340 - if (filteredProps !== null) {
341 - const maybeStyleAndLayout = getStyleAndLayout(id);
342 - // Hide props.style if we are showing the style editor UI.
343 - if (maybeStyleAndLayout !== null && maybeStyleAndLayout.style !== null) {
344 - delete filteredProps['style'];
345 - }
346 - }
347 -
337 return (
338 <div className={styles.InspectedElement}>
339 <HocBadges element={element} />
340 <InspectedElementTree
341 label="props"
353 - data={filteredProps}
342 + data={props}
343 inspectPath={inspectPropsPath}
344 overrideValueFn={overridePropsFn}
345 showWhenEmpty