diff --git a/src/plugins/discover/public/application/components/data_grid/data_grid_table.tsx b/src/plugins/discover/public/application/components/data_grid/data_grid_table.tsx
index fcb786b23e86..655eb087e842 100644
--- a/src/plugins/discover/public/application/components/data_grid/data_grid_table.tsx
+++ b/src/plugins/discover/public/application/components/data_grid/data_grid_table.tsx
@@ -13,7 +13,6 @@ import { DataGridFlyout } from './data_grid_table_flyout';
import { DiscoverGridContextProvider } from './data_grid_table_context';
import { toolbarVisibility } from './constants';
import { DocViewFilterFn, OpenSearchSearchHit } from '../../doc_views/doc_views_types';
-import { DiscoverServices } from '../../../build_services';
import { usePagination } from '../utils/use_pagination';
import { SortOrder } from '../../../saved_searches/types';
import { buildColumns } from '../../utils/columns';
diff --git a/src/plugins/discover/public/embeddable/search_embeddable.scss b/src/plugins/discover/public/embeddable/search_embeddable.scss
new file mode 100644
index 000000000000..e953968495e7
--- /dev/null
+++ b/src/plugins/discover/public/embeddable/search_embeddable.scss
@@ -0,0 +1,12 @@
+/**
+ * 1. We want the osdDocTable__container to scroll only when embedded in an embeddable panel
+ * 2. Force a better looking scrollbar
+ */
+.embPanel {
+ .osdDocTable__container {
+ @include euiScrollBar; /* 2 */
+
+ flex: 1 1 0; /* 1 */
+ overflow: auto; /* 1 */
+ }
+}
diff --git a/src/plugins/discover/public/embeddable/search_embeddable.tsx b/src/plugins/discover/public/embeddable/search_embeddable.tsx
index 8b8db9079ba6..a37a001ad798 100644
--- a/src/plugins/discover/public/embeddable/search_embeddable.tsx
+++ b/src/plugins/discover/public/embeddable/search_embeddable.tsx
@@ -374,7 +374,9 @@ export class SearchEmbeddable
const props = {
searchProps,
};
- ReactDOM.render(, node);
+
+ const MemorizedSearchEmbeddableComponent = React.memo(SearchEmbeddableComponent);
+ ReactDOM.render(, node);
}
private async pushContainerStateParamsToProps(searchProps: SearchProps, force: boolean = false) {
diff --git a/src/plugins/discover/public/embeddable/search_embeddable_component.tsx b/src/plugins/discover/public/embeddable/search_embeddable_component.tsx
index c8ae54a16429..97df2e5c45b7 100644
--- a/src/plugins/discover/public/embeddable/search_embeddable_component.tsx
+++ b/src/plugins/discover/public/embeddable/search_embeddable_component.tsx
@@ -12,6 +12,7 @@ import {
DataGridTableProps,
} from '../application/components/data_grid/data_grid_table';
import { VisualizationNoResults } from '../../../visualizations/public';
+import './search_embeddable.scss';
interface SearchEmbeddableProps {
searchProps: SearchProps;
@@ -51,7 +52,7 @@ export function SearchEmbeddableComponent({ searchProps }: SearchEmbeddableProps
data-test-subj="embeddedSavedSearchDocTable"
>
{discoverEmbeddableProps.totalHitCount !== 0 ? (
-
+
) : (