Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Split Select component into Async and Sync components #20466

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions superset-frontend/src/addSlice/AddSliceContainer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import React from 'react';
import { ReactWrapper } from 'enzyme';
import Button from 'src/components/Button';
import { Select } from 'src/components';
import { AsyncSelect } from 'src/components';
import AddSliceContainer, {
AddSliceContainerProps,
AddSliceContainerState,
Expand Down Expand Up @@ -72,7 +72,7 @@ async function getWrapper(user = mockUser) {

test('renders a select and a VizTypeControl', async () => {
const wrapper = await getWrapper();
expect(wrapper.find(Select)).toExist();
expect(wrapper.find(AsyncSelect)).toExist();
expect(wrapper.find(VizTypeGallery)).toExist();
});

Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/addSlice/AddSliceContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { getUrlParam } from 'src/utils/urlUtils';
import { URL_PARAMS } from 'src/constants';
import { isNullish } from 'src/utils/common';
import Button from 'src/components/Button';
import { Select, Steps } from 'src/components';
import { AsyncSelect, Steps } from 'src/components';
import { Tooltip } from 'src/components/Tooltip';

import VizTypeGallery, {
Expand Down Expand Up @@ -349,7 +349,7 @@ export default class AddSliceContainer extends React.PureComponent<
status={this.state.datasource?.value ? 'finish' : 'process'}
description={
<StyledStepDescription className="dataset">
<Select
<AsyncSelect
autoFocus
ariaLabel={t('Dataset')}
name="select-datasource"
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/components/DatabaseSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import React, { ReactNode, useState, useMemo, useEffect } from 'react';
import { styled, SupersetClient, t } from '@superset-ui/core';
import rison from 'rison';
import { Select } from 'src/components';
import { AsyncSelect, Select } from 'src/components';
import Label from 'src/components/Label';
import { FormLabel } from 'src/components/Form';
import RefreshLabel from 'src/components/RefreshLabel';
Expand Down Expand Up @@ -272,7 +272,7 @@ export default function DatabaseSelector({

function renderDatabaseSelect() {
return renderSelectRow(
<Select
<AsyncSelect
ariaLabel={t('Select database or type database name')}
optionFilterProps={['database_name', 'value']}
data-test="select-database"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Alert from 'src/components/Alert';
import Badge from 'src/components/Badge';
import shortid from 'shortid';
import { styled, SupersetClient, t, withTheme } from '@superset-ui/core';
import { Select, Row, Col } from 'src/components';
import { Select, AsyncSelect, Row, Col } from 'src/components';
import { FormLabel } from 'src/components/Form';
import Button from 'src/components/Button';
import Tabs from 'src/components/Tabs';
Expand Down Expand Up @@ -548,7 +548,7 @@ function OwnersSelector({ datasource, onChange }) {
}, []);

return (
<Select
<AsyncSelect
ariaLabel={t('Select owners')}
mode="multiple"
name="owners"
Expand Down
Loading