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

This commit is contained in:
Brian Vaughn
2019-07-24 15:48:48 -07:00
parent c7aff5503f
commit 8d1c829019
@@ -13,7 +13,6 @@ import InspectedElementTree from './InspectedElementTree';
import { InspectedElementContext } from './InspectedElementContext';
import ViewElementSourceContext from './ViewElementSourceContext';
import NativeStyleEditor from './NativeStyleEditor';
import { NativeStyleContext } from './NativeStyleEditor/context';
import Toggle from '../Toggle';
import Badge from './Badge';
import {
@@ -264,7 +263,6 @@ function InspectedElementView({
const { ownerID } = useContext(TreeStateContext);
const bridge = useContext(BridgeContext);
const store = useContext(StoreContext);
const { getStyleAndLayout } = useContext(NativeStyleContext);
const inspectContextPath = useCallback(
(path: Array<string | number>) => {
@@ -336,21 +334,12 @@ function InspectedElementView({
};
}
let filteredProps = props;
if (filteredProps !== null) {
const maybeStyleAndLayout = getStyleAndLayout(id);
// Hide props.style if we are showing the style editor UI.
if (maybeStyleAndLayout !== null && maybeStyleAndLayout.style !== null) {
delete filteredProps['style'];
}
}
return (
<div className={styles.InspectedElement}>
<HocBadges element={element} />
<InspectedElementTree
label="props"
data={filteredProps}
data={props}
inspectPath={inspectPropsPath}
overrideValueFn={overridePropsFn}
showWhenEmpty