Skip to content

Commit cc20fdd

Browse files
committed
feat: rollback filter bar changes
1 parent 8ec9d37 commit cc20fdd

1 file changed

Lines changed: 12 additions & 37 deletions

File tree

  • src/plugins/unified_search/public/filter_bar

src/plugins/unified_search/public/filter_bar/index.tsx

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,26 @@
77
*/
88

99
import React from 'react';
10-
import { withSuspense } from '@kbn/shared-ux-utility';
1110

1211
const Fallback = () => <div />;
1312

14-
/**
15-
* The Lazily-loaded `FilterBar` component. Consumers should use `React.Suspense` or
16-
* the withSuspense` HOC to load this component.
17-
*/
18-
1913
const LazyFilterBar = React.lazy(() => import('./filter_bar'));
2014
export const FilterBar = (props: React.ComponentProps<typeof LazyFilterBar>) => (
2115
<React.Suspense fallback={<Fallback />}>
2216
<LazyFilterBar {...props} />
2317
</React.Suspense>
2418
);
2519

26-
/**
27-
* A `FilterBar` component that is wrapped by the `withSuspense` HOC. This component can
28-
* be used directly by consumers and will load the `FilterBarLazy` component lazily with
29-
* a predefined fallback and error boundary.
30-
*/
31-
// export const FilterBar = withSuspense(FilterBarLazy);
32-
33-
/**
34-
* The Lazily-loaded `FilterLabel` component. Consumers should use `React.Suspense` or
35-
* the withSuspense` HOC to load this component.
36-
*/
37-
const FilterLabelLazy = React.lazy(() => import('./filter_editor/lib/filter_label'));
38-
39-
/**
40-
* A `FilterLabel` component that is wrapped by the `withSuspense` HOC. This component can
41-
* be used directly by consumers and will load the `FilterLabelLazy` component lazily with
42-
* a predefined fallback and error boundary.
43-
*/
44-
export const FilterLabel = withSuspense(FilterLabelLazy);
45-
46-
/**
47-
* The Lazily-loaded `FilterItem` component. Consumers should use `React.Suspense` or
48-
* the withSuspense` HOC to load this component.
49-
*/
50-
const FilterItemLazy = React.lazy(() => import('./filter_item'));
20+
const LazyFilterLabel = React.lazy(() => import('./filter_editor/lib/filter_label'));
21+
export const FilterLabel = (props: React.ComponentProps<typeof LazyFilterLabel>) => (
22+
<React.Suspense fallback={<Fallback />}>
23+
<LazyFilterLabel {...props} />
24+
</React.Suspense>
25+
);
5126

52-
/**
53-
* A `FilterItem` component that is wrapped by the `withSuspense` HOC. This component can
54-
* be used directly by consumers and will load the `FilterItemLazy` component lazily with
55-
* a predefined fallback and error boundary.
56-
*/
57-
export const FilterItem = withSuspense(FilterItemLazy);
27+
const LazyFilterItem = React.lazy(() => import('./filter_item'));
28+
export const FilterItem = (props: React.ComponentProps<typeof LazyFilterItem>) => (
29+
<React.Suspense fallback={<Fallback />}>
30+
<LazyFilterItem {...props} />
31+
</React.Suspense>
32+
);

0 commit comments

Comments
 (0)