From 29b6be23e8cda2f646ccf06231a9ee537916448e Mon Sep 17 00:00:00 2001 From: Paco Estevez Garcia Date: Wed, 8 Jul 2020 07:00:39 -0700 Subject: [PATCH] Remove unused prop Summary: While reading through the Inspector I found this prop passed down and not used anywhere printer_shredder Reviewed By: Katalune Differential Revision: D22431895 fbshipit-source-id: 6cbc97b3faec26349a1ad900ffa455e95f53bb2b --- .../src/ui/components/elements-inspector/ElementsInspector.tsx | 1 - desktop/plugins/layout/Inspector.tsx | 2 -- desktop/plugins/layout/MultipleSelectionSection.tsx | 1 - desktop/plugins/layout/__tests__/Inspector.node.tsx | 1 - desktop/plugins/layout/index.tsx | 1 - desktop/plugins/leak_canary/index.tsx | 1 - 6 files changed, 7 deletions(-) diff --git a/desktop/app/src/ui/components/elements-inspector/ElementsInspector.tsx b/desktop/app/src/ui/components/elements-inspector/ElementsInspector.tsx index a18350113..d29007078 100644 --- a/desktop/app/src/ui/components/elements-inspector/ElementsInspector.tsx +++ b/desktop/app/src/ui/components/elements-inspector/ElementsInspector.tsx @@ -61,7 +61,6 @@ export type ElementsInspectorProps = { | ((key: ElementID | undefined | null) => any) | undefined | null; - onValueChanged: ((path: Array, val: any) => any) | undefined | null; selected: ElementID | undefined | null; focused?: ElementID | undefined | null; searchResults?: ElementSearchResultSet | undefined | null; diff --git a/desktop/plugins/layout/Inspector.tsx b/desktop/plugins/layout/Inspector.tsx index d528cd551..f323359fe 100644 --- a/desktop/plugins/layout/Inspector.tsx +++ b/desktop/plugins/layout/Inspector.tsx @@ -48,7 +48,6 @@ type Props = { selectedElement: ElementID | null | undefined; selectedAXElement: ElementID | null | undefined; onSelect: (ids: ElementID | null | undefined) => void; - onDataValueChanged: (path: Array, value: any) => void; setPersistedState: (state: Partial) => void; persistedState: PersistedState; searchResults: ElementSearchResultSet | null; @@ -443,7 +442,6 @@ export default class Inspector extends Component { onElementSelected={this.onElementSelectedAtMainSection} onElementHovered={this.onElementHovered} onElementExpanded={this.onElementExpanded} - onValueChanged={this.props.onDataValueChanged} searchResults={this.props.searchResults} selected={this.selected()} root={this.root()} diff --git a/desktop/plugins/layout/MultipleSelectionSection.tsx b/desktop/plugins/layout/MultipleSelectionSection.tsx index 36417171f..c37bba360 100644 --- a/desktop/plugins/layout/MultipleSelectionSection.tsx +++ b/desktop/plugins/layout/MultipleSelectionSection.tsx @@ -84,7 +84,6 @@ const MultipleSelectorSection: React.FC = memo( }} onElementHovered={onElementHovered} onElementExpanded={() => {}} - onValueChanged={null} root={null} selected={selectedId} elements={elements} diff --git a/desktop/plugins/layout/__tests__/Inspector.node.tsx b/desktop/plugins/layout/__tests__/Inspector.node.tsx index 7515c8079..6312e9226 100644 --- a/desktop/plugins/layout/__tests__/Inspector.node.tsx +++ b/desktop/plugins/layout/__tests__/Inspector.node.tsx @@ -37,7 +37,6 @@ beforeEach(() => { selectedElement={null} selectedAXElement={null} onSelect={() => {}} - onDataValueChanged={() => {}} setPersistedState={() => {}} persistedState={{ rootElement: null, diff --git a/desktop/plugins/layout/index.tsx b/desktop/plugins/layout/index.tsx index 34a30622b..04e298cf6 100644 --- a/desktop/plugins/layout/index.tsx +++ b/desktop/plugins/layout/index.tsx @@ -344,7 +344,6 @@ export default class LayoutPlugin extends FlipperPlugin< selectedAXElement: this.state.selectedAXElement, setPersistedState: this.props.setPersistedState, persistedState: this.props.persistedState, - onDataValueChanged: this.onDataValueChanged, searchResults: this.state.searchResults, }; diff --git a/desktop/plugins/leak_canary/index.tsx b/desktop/plugins/leak_canary/index.tsx index a9b5d88ed..5370691e7 100644 --- a/desktop/plugins/leak_canary/index.tsx +++ b/desktop/plugins/leak_canary/index.tsx @@ -200,7 +200,6 @@ export default class LeakCanary extends FlipperPlugin< onElementExpanded={(eid /*, deep*/) => { this._toggleElement(idx, eid); }} - onValueChanged={() => {}} selected={selected} searchResults={null} root={leak.root}