From 1dafe351f745981ec475f657c069481098967a59 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Wed, 30 Jun 2021 10:40:50 -0700 Subject: [PATCH] Remove SearchableDataInspector Summary: Fury was the last user of this component Reviewed By: nikoant Differential Revision: D29426804 fbshipit-source-id: 793135119e70b41eda0391d3fedee1c9b6834cbd --- desktop/app/src/index.tsx | 1 - .../SearchableDataInspector.tsx | 42 ------------------- desktop/app/src/ui/index.tsx | 1 - 3 files changed, 44 deletions(-) delete mode 100644 desktop/app/src/ui/components/data-inspector/SearchableDataInspector.tsx diff --git a/desktop/app/src/index.tsx b/desktop/app/src/index.tsx index 59f5f0414..cc9558fba 100644 --- a/desktop/app/src/index.tsx +++ b/desktop/app/src/index.tsx @@ -89,7 +89,6 @@ export { MarkerTimeline, } from 'flipper-plugin'; export {DataInspector as ManagedDataInspector} from 'flipper-plugin'; -export {default as SearchableDataInspector} from './ui/components/data-inspector/SearchableDataInspector'; export {HighlightManager} from 'flipper-plugin'; export {default as Tabs} from './ui/components/Tabs'; export {default as Tab} from './ui/components/Tab'; diff --git a/desktop/app/src/ui/components/data-inspector/SearchableDataInspector.tsx b/desktop/app/src/ui/components/data-inspector/SearchableDataInspector.tsx deleted file mode 100644 index 091c7d9ed..000000000 --- a/desktop/app/src/ui/components/data-inspector/SearchableDataInspector.tsx +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import React from 'react'; -import debounceRender from 'react-debounce-render'; - -import {DataInspector} from 'flipper-plugin'; -import Searchable, {SearchableProps} from '../searchable/Searchable'; - -type ManagedDataInspectorProps = any; // TODO! - -type Props = ManagedDataInspectorProps & SearchableProps; - -function filter(data: any, searchTerm: string): any { - if (searchTerm === '') { - return data; - } - const res: any = {}; - const lowerSearch = searchTerm.toLowerCase(); - - for (const key in data) { - if (key.toLowerCase().indexOf(lowerSearch) != -1) { - res[key] = data[key]; - } - } - return res; -} - -// Naive shallow filters matching wrapper for ManagedDataInspector -function SearchableDataInspector(props: Props) { - return ( - - ); -} - -export default Searchable(debounceRender(SearchableDataInspector, 250, {})); diff --git a/desktop/app/src/ui/index.tsx b/desktop/app/src/ui/index.tsx index beacd2ab3..091c58cbc 100644 --- a/desktop/app/src/ui/index.tsx +++ b/desktop/app/src/ui/index.tsx @@ -39,7 +39,6 @@ export {ManagedTableProps} from './components/table/ManagedTable'; export {DataValueExtractor, DataInspectorExpanded} from 'flipper-plugin'; export {DataInspector as ManagedDataInspector} from 'flipper-plugin'; -export {default as SearchableDataInspector} from './components/data-inspector/SearchableDataInspector'; // tabs export {default as Tabs} from './components/Tabs';