Deep-linking records to other strong records in the Store tab
Summary: All strong records with a matching record available in the store tab are underlined. When clicked on, it will direct the user to the corresponding store record. Reviewed By: jonathoma Differential Revision: D22622612 fbshipit-source-id: 537dbb282e4ae1ff695c577ab47c413d41a10fa4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7d06571cfa
commit
9e4c5363c5
@@ -144,6 +144,10 @@ type DataInspectorProps = {
|
|||||||
name: string,
|
name: string,
|
||||||
highlighter: HighlightManager,
|
highlighter: HighlightManager,
|
||||||
) => React.ReactElement;
|
) => React.ReactElement;
|
||||||
|
/**
|
||||||
|
* Render callback that can be used to customize the rendering of object values.
|
||||||
|
*/
|
||||||
|
onRenderDescription?: (description: React.ReactElement) => React.ReactElement;
|
||||||
/**
|
/**
|
||||||
* Callback when a value is edited.
|
* Callback when a value is edited.
|
||||||
*/
|
*/
|
||||||
@@ -336,6 +340,7 @@ const DataInspector: React.FC<DataInspectorProps> = memo(
|
|||||||
onExpanded,
|
onExpanded,
|
||||||
onDelete,
|
onDelete,
|
||||||
onRenderName,
|
onRenderName,
|
||||||
|
onRenderDescription,
|
||||||
extractValue: extractValueProp,
|
extractValue: extractValueProp,
|
||||||
expanded: expandedPaths,
|
expanded: expandedPaths,
|
||||||
name,
|
name,
|
||||||
@@ -501,6 +506,7 @@ const DataInspector: React.FC<DataInspectorProps> = memo(
|
|||||||
onExpanded={onExpanded}
|
onExpanded={onExpanded}
|
||||||
onDelete={onDelete}
|
onDelete={onDelete}
|
||||||
onRenderName={onRenderName}
|
onRenderName={onRenderName}
|
||||||
|
onRenderDescription={onRenderDescription}
|
||||||
parentPath={path}
|
parentPath={path}
|
||||||
depth={depth + 1}
|
depth={depth + 1}
|
||||||
key={key}
|
key={key}
|
||||||
@@ -566,6 +572,10 @@ const DataInspector: React.FC<DataInspectorProps> = memo(
|
|||||||
extra={extra}
|
extra={extra}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
descriptionOrPreview = onRenderDescription
|
||||||
|
? onRenderDescription(descriptionOrPreview)
|
||||||
|
: descriptionOrPreview;
|
||||||
} else {
|
} else {
|
||||||
descriptionOrPreview = (
|
descriptionOrPreview = (
|
||||||
<DataPreview
|
<DataPreview
|
||||||
|
|||||||
@@ -49,6 +49,10 @@ export type ManagedDataInspectorProps = {
|
|||||||
name: string,
|
name: string,
|
||||||
highlighter: HighlightManager,
|
highlighter: HighlightManager,
|
||||||
) => React.ReactElement;
|
) => React.ReactElement;
|
||||||
|
/**
|
||||||
|
* Render callback that can be used to customize the rendering of object values.
|
||||||
|
*/
|
||||||
|
onRenderDescription?: (description: React.ReactElement) => React.ReactElement;
|
||||||
/**
|
/**
|
||||||
* Whether all objects and arrays should be collapsed by default.
|
* Whether all objects and arrays should be collapsed by default.
|
||||||
*/
|
*/
|
||||||
@@ -179,6 +183,7 @@ export default class ManagedDataInspector extends PureComponent<
|
|||||||
onExpanded={this.onExpanded}
|
onExpanded={this.onExpanded}
|
||||||
onDelete={this.props.onDelete}
|
onDelete={this.props.onDelete}
|
||||||
onRenderName={this.props.onRenderName}
|
onRenderName={this.props.onRenderName}
|
||||||
|
onRenderDescription={this.props.onRenderDescription}
|
||||||
expandRoot={this.props.expandRoot}
|
expandRoot={this.props.expandRoot}
|
||||||
collapsed={this.props.filter ? true : this.props.collapsed}
|
collapsed={this.props.filter ? true : this.props.collapsed}
|
||||||
tooltips={this.props.tooltips}
|
tooltips={this.props.tooltips}
|
||||||
|
|||||||
Reference in New Issue
Block a user