Skip to content

Commit

Permalink
fix: add DropdownRender Spin
Browse files Browse the repository at this point in the history
  • Loading branch information
siriuswh0327 committed Oct 26, 2023
1 parent b4e220f commit 4181dc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/shared/lib/components/BasicSelect/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { ConfigProvider, SelectProps } from 'antd5';
import { ConfigProvider, SelectProps, Spin } from 'antd5';
import { useTranslation } from 'react-i18next';
import { IconClose } from '../../Icon';
import classnames from 'classnames';
import { BasicSelectStyleWrapper } from './style';
import { ComponentControlHeight } from '../../data/common';
import { ReactElement } from 'react';

const BasicSelect = <V = any,>(props: SelectProps<V>) => {
const { t } = useTranslation();
Expand All @@ -28,6 +29,9 @@ const BasicSelect = <V = any,>(props: SelectProps<V>) => {
clearIcon={<IconClose />}
allowClear={allowClear}
loading={loading}
dropdownRender={(options: ReactElement) => (
<Spin spinning={loading}>{options}</Spin>
)}
//ts checker error
// allowClear={
// !!allowClear
Expand Down

0 comments on commit 4181dc7

Please sign in to comment.