perf(explore): virtualized datasource field sections (#27625)

This commit is contained in:
JUST.in DO IT
2024-03-27 11:25:55 -07:00
committed by GitHub
parent c73b24ad08
commit 38eecfc5d4
7 changed files with 504 additions and 185 deletions

View File

@@ -30,6 +30,17 @@ import {
import { DatasourceType } from '@superset-ui/core';
import DatasourceControl from 'src/explore/components/controls/DatasourceControl';
jest.mock(
'react-virtualized-auto-sizer',
() =>
({
children,
}: {
children: (params: { height: number }) => React.ReactChild;
}) =>
children({ height: 500 }),
);
const datasource: IDatasource = {
id: 1,
type: DatasourceType.Table,
@@ -69,6 +80,7 @@ const props: DatasourcePanelProps = {
actions: {
setControlValue: jest.fn(),
},
width: 300,
};
const search = (value: string, input: HTMLElement) => {