From 61d80b4bb93a2f1ed8629270791281dc7fdc6db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Fri, 19 Oct 2018 08:35:58 -0700 Subject: [PATCH] network deeplink Summary: Deep link from the QPL plugin into the network plugin Reviewed By: passy Differential Revision: D10462528 fbshipit-source-id: cc044863191fc4375390165f6b7b7d5c5e9c77e3 --- src/plugins/network/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/network/index.js b/src/plugins/network/index.js index 97d2a98f4..3bb7d90f9 100644 --- a/src/plugins/network/index.js +++ b/src/plugins/network/index.js @@ -168,7 +168,7 @@ export default class extends FlipperPlugin { }; state = { - selectedIds: [], + selectedIds: this.props.deepLinkPayload ? [this.props.deepLinkPayload] : [], }; onRowHighlighted = (selectedIds: Array) => @@ -203,6 +203,9 @@ export default class extends FlipperPlugin { responses={responses || {}} clear={this.clearLogs} onRowHighlighted={this.onRowHighlighted} + highlightedRows={ + this.state.selectedIds ? new Set(this.state.selectedIds) : null + } /> {this.renderSidebar()} @@ -215,6 +218,7 @@ type NetworkTableProps = { responses: {[id: RequestId]: Response}, clear: () => void, onRowHighlighted: (keys: TableHighlightedRows) => void, + highlightedRows: ?Set, }; type NetworkTableState = {| @@ -357,6 +361,7 @@ class NetworkTable extends PureComponent { columns={COLUMNS} rows={this.state.sortedRows} onRowHighlighted={this.props.onRowHighlighted} + highlightedRows={this.props.highlightedRows} rowLineHeight={26} zebra={false} actions={}