mirror of
https://github.com/apache/superset.git
synced 2024-09-07 06:17:45 -04:00
chore: Remove dependency warnings from SqlEditorLeftBar/index.tsx (#22975)
This commit is contained in:
parent
1324135697
commit
76f7a3fb4e
@ -210,35 +210,50 @@ const SqlEditorLeftBar = ({
|
||||
const shouldShowReset = window.location.search === '?reset=1';
|
||||
const tableMetaDataHeight = height - 130; // 130 is the height of the selects above
|
||||
|
||||
const handleSchemaChange = useCallback((schema: string) => {
|
||||
if (queryEditor) {
|
||||
dispatch(queryEditorSetSchema(queryEditor, schema));
|
||||
}
|
||||
}, []);
|
||||
const handleSchemaChange = useCallback(
|
||||
(schema: string) => {
|
||||
if (queryEditor) {
|
||||
dispatch(queryEditorSetSchema(queryEditor, schema));
|
||||
}
|
||||
},
|
||||
[dispatch, queryEditor],
|
||||
);
|
||||
|
||||
const handleTablesLoad = useCallback((options: Array<any>) => {
|
||||
if (queryEditor) {
|
||||
dispatch(queryEditorSetTableOptions(queryEditor, options));
|
||||
}
|
||||
}, []);
|
||||
const handleTablesLoad = useCallback(
|
||||
(options: Array<any>) => {
|
||||
if (queryEditor) {
|
||||
dispatch(queryEditorSetTableOptions(queryEditor, options));
|
||||
}
|
||||
},
|
||||
[dispatch, queryEditor],
|
||||
);
|
||||
|
||||
const handleSchemasLoad = useCallback((options: Array<any>) => {
|
||||
if (queryEditor) {
|
||||
dispatch(queryEditorSetSchemaOptions(queryEditor, options));
|
||||
}
|
||||
}, []);
|
||||
const handleSchemasLoad = useCallback(
|
||||
(options: Array<any>) => {
|
||||
if (queryEditor) {
|
||||
dispatch(queryEditorSetSchemaOptions(queryEditor, options));
|
||||
}
|
||||
},
|
||||
[dispatch, queryEditor],
|
||||
);
|
||||
|
||||
const handleDbList = useCallback((result: DatabaseObject) => {
|
||||
dispatch(setDatabases(result));
|
||||
}, []);
|
||||
const handleDbList = useCallback(
|
||||
(result: DatabaseObject) => {
|
||||
dispatch(setDatabases(result));
|
||||
},
|
||||
[dispatch],
|
||||
);
|
||||
|
||||
const handleError = useCallback((message: string) => {
|
||||
dispatch(addDangerToast(message));
|
||||
}, []);
|
||||
const handleError = useCallback(
|
||||
(message: string) => {
|
||||
dispatch(addDangerToast(message));
|
||||
},
|
||||
[dispatch],
|
||||
);
|
||||
|
||||
const handleResetState = useCallback(() => {
|
||||
dispatch(resetState());
|
||||
}, []);
|
||||
}, [dispatch]);
|
||||
|
||||
return (
|
||||
<LeftBarStyles data-test="sql-editor-left-bar">
|
||||
|
Loading…
Reference in New Issue
Block a user