michael-s-molina commented on code in PR #21094: URL: https://github.com/apache/superset/pull/21094#discussion_r968405586
########## superset-frontend/src/components/Select/AsyncSelect.tsx: ########## @@ -29,58 +29,33 @@ import React, { useCallback, useImperativeHandle, } from 'react'; -import { ensureIsArray, styled, t } from '@superset-ui/core'; -import AntdSelect, { - SelectProps as AntdSelectProps, - SelectValue as AntdSelectValue, - LabeledValue as AntdLabeledValue, -} from 'antd/lib/select'; +import { ensureIsArray, t } from '@superset-ui/core'; +import { LabeledValue as AntdLabeledValue } from 'antd/lib/select'; import { DownOutlined, SearchOutlined } from '@ant-design/icons'; -import { Spin } from 'antd'; import debounce from 'lodash/debounce'; import { isEqual } from 'lodash'; import Icons from 'src/components/Icons'; import { getClientErrorObject } from 'src/utils/getClientErrorObject'; import { SLOW_DEBOUNCE } from 'src/constants'; -import { rankedSearchCompare } from 'src/utils/rankedSearchCompare'; import { getValue, hasOption, isLabeledValue } from './utils'; - -const { Option } = AntdSelect; - -type AntdSelectAllProps = AntdSelectProps<AntdSelectValue>; - -type PickedSelectProps = Pick< - AntdSelectAllProps, - | 'allowClear' - | 'autoFocus' - | 'disabled' - | 'filterOption' - | 'loading' - | 'notFoundContent' - | 'onChange' - | 'onClear' - | 'onFocus' - | 'onBlur' - | 'onDropdownVisibleChange' - | 'placeholder' - | 'showSearch' - | 'tokenSeparators' - | 'value' - | 'getPopupContainer' ->; - -export type OptionsType = Exclude<AntdSelectAllProps['options'], undefined>; - -export type OptionsTypePage = { - data: OptionsType; - totalCount: number; -}; - -export type OptionsPagePromise = ( - search: string, - page: number, - pageSize: number, -) => Promise<OptionsTypePage>; +import { Review Comment: Makes sense. Can you move `handleClear` as well? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org