mirror of
https://github.com/apache/superset.git
synced 2026-04-24 02:25:13 +00:00
chore: Use queryEditorId in SqlEditor child components (#21650)
This commit is contained in:
@@ -24,7 +24,7 @@ import { Store } from 'redux';
|
||||
import { render, fireEvent, waitFor } from 'spec/helpers/testing-library';
|
||||
import { initialState, defaultQueryEditor } from 'src/SqlLab/fixtures';
|
||||
import RunQueryActionButton, {
|
||||
Props,
|
||||
RunQueryActionButtonProps,
|
||||
} from 'src/SqlLab/components/RunQueryActionButton';
|
||||
|
||||
const middlewares = [thunk];
|
||||
@@ -51,7 +51,7 @@ const defaultProps = {
|
||||
overlayCreateAsMenu: null,
|
||||
};
|
||||
|
||||
const setup = (props?: Partial<Props>, store?: Store) =>
|
||||
const setup = (props?: Partial<RunQueryActionButtonProps>, store?: Store) =>
|
||||
render(<RunQueryActionButton {...defaultProps} {...props} />, {
|
||||
useRedux: true,
|
||||
...(store && { store }),
|
||||
|
||||
@@ -27,7 +27,7 @@ import { detectOS } from 'src/utils/common';
|
||||
import { QueryButtonProps } from 'src/SqlLab/types';
|
||||
import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor';
|
||||
|
||||
export interface Props {
|
||||
export interface RunQueryActionButtonProps {
|
||||
queryEditorId: string;
|
||||
allowAsync: boolean;
|
||||
queryState?: string;
|
||||
@@ -81,14 +81,14 @@ const StyledButton = styled.span`
|
||||
}
|
||||
`;
|
||||
|
||||
const RunQueryActionButton: React.FC<Props> = ({
|
||||
const RunQueryActionButton = ({
|
||||
allowAsync = false,
|
||||
queryEditorId,
|
||||
queryState,
|
||||
overlayCreateAsMenu,
|
||||
runQuery,
|
||||
stopQuery,
|
||||
}) => {
|
||||
}: RunQueryActionButtonProps) => {
|
||||
const theme = useTheme();
|
||||
const userOS = detectOS();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user