Skip to content

Commit dbe83b2

Browse files
authored
fix(Preview): do not auto refresh table preview (#1503)
1 parent ee06b4e commit dbe83b2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/containers/Tenant/Query/Preview/Preview.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {previewApi} from '../../../../store/reducers/preview';
88
import {setShowPreview} from '../../../../store/reducers/schema/schema';
99
import type {EPathType} from '../../../../types/api/schema';
1010
import {cn} from '../../../../utils/cn';
11-
import {useAutoRefreshInterval, useTypedDispatch} from '../../../../utils/hooks';
11+
import {useTypedDispatch} from '../../../../utils/hooks';
1212
import {parseQueryErrorToString} from '../../../../utils/query';
1313
import {isExternalTableType, isTableType} from '../../utils/schema';
1414
import i18n from '../i18n';
@@ -28,13 +28,10 @@ export const Preview = ({database, path, type}: PreviewProps) => {
2828

2929
const isPreviewAvailable = isTableType(type);
3030

31-
const [autoRefreshInterval] = useAutoRefreshInterval();
32-
3331
const query = `select * from \`${path}\` limit 32`;
3432
const {currentData, isFetching, error} = previewApi.useSendQueryQuery(
3533
{database, query, action: isExternalTableType(type) ? 'execute-query' : 'execute-scan'},
3634
{
37-
pollingInterval: autoRefreshInterval,
3835
skip: !isPreviewAvailable,
3936
refetchOnMountOrArgChange: true,
4037
},

0 commit comments

Comments
 (0)