mirror of
https://github.com/apache/superset.git
synced 2024-09-18 11:39:49 -04:00
fix antd select dropdown issue (#13585)
This commit is contained in:
parent
3078c84d40
commit
f2c50f62ad
@ -17,6 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { ConfigProvider } from 'antd';
|
||||||
import { styled, t } from '@superset-ui/core';
|
import { styled, t } from '@superset-ui/core';
|
||||||
import ReactCronPicker, { Locale, CronProps } from 'react-js-cron';
|
import ReactCronPicker, { Locale, CronProps } from 'react-js-cron';
|
||||||
|
|
||||||
@ -103,7 +104,11 @@ export const LOCALE: Locale = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const CronPicker = styled((props: CronProps) => (
|
export const CronPicker = styled((props: CronProps) => (
|
||||||
|
<ConfigProvider
|
||||||
|
getPopupContainer={trigger => trigger.parentElement as HTMLElement}
|
||||||
|
>
|
||||||
<ReactCronPicker locale={LOCALE} {...props} />
|
<ReactCronPicker locale={LOCALE} {...props} />
|
||||||
|
</ConfigProvider>
|
||||||
))`
|
))`
|
||||||
.react-js-cron-select:not(.react-js-cron-custom-select) > div:first-of-type,
|
.react-js-cron-select:not(.react-js-cron-custom-select) > div:first-of-type,
|
||||||
.react-js-cron-custom-select {
|
.react-js-cron-custom-select {
|
||||||
|
@ -16,10 +16,16 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
import React from 'react';
|
||||||
import { styled } from '@superset-ui/core';
|
import { styled } from '@superset-ui/core';
|
||||||
import { Select as BaseSelect } from 'src/common/components';
|
import { Select as BaseSelect, SelectProps } from 'src/common/components';
|
||||||
|
|
||||||
const StyledSelect = styled(BaseSelect)`
|
const StyledSelect = styled((props: SelectProps<any>) => (
|
||||||
|
<BaseSelect
|
||||||
|
getPopupContainer={(trigger: any) => trigger.parentNode}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
))`
|
||||||
display: block;
|
display: block;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ export {
|
|||||||
Slider,
|
Slider,
|
||||||
Row,
|
Row,
|
||||||
Space,
|
Space,
|
||||||
Select,
|
|
||||||
Skeleton,
|
Skeleton,
|
||||||
Switch,
|
Switch,
|
||||||
Tag,
|
Tag,
|
||||||
@ -52,10 +51,11 @@ export {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
Input as AntdInput,
|
Input as AntdInput,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
export { default as Alert, AlertProps } from 'antd/lib/alert';
|
|
||||||
export { TreeProps } from 'antd/lib/tree';
|
|
||||||
export { FormInstance } from 'antd/lib/form';
|
export { FormInstance } from 'antd/lib/form';
|
||||||
export { RadioChangeEvent } from 'antd/lib/radio';
|
export { RadioChangeEvent } from 'antd/lib/radio';
|
||||||
|
export { TreeProps } from 'antd/lib/tree';
|
||||||
|
export { default as Alert, AlertProps } from 'antd/lib/alert';
|
||||||
|
export { default as Select, SelectProps } from 'antd/lib/select';
|
||||||
|
|
||||||
export { default as Collapse } from './Collapse';
|
export { default as Collapse } from './Collapse';
|
||||||
export { default as Progress } from './ProgressBar';
|
export { default as Progress } from './ProgressBar';
|
||||||
|
Loading…
Reference in New Issue
Block a user