fix(dashboard): resolve dropdown popup positioning (#36963)

This commit is contained in:
Reynold Morel
2026-01-28 10:01:37 -04:00
committed by GitHub
parent da56bddada
commit 43653d1fa1
3 changed files with 10 additions and 1 deletions

View File

@@ -64,6 +64,7 @@ import {
} from './styles';
import {
DEFAULT_SORT_COMPARATOR,
DROPDOWN_ALIGN_BOTTOM,
EMPTY_OPTIONS,
MAX_TAG_COUNT,
TOKEN_SEPARATORS,
@@ -777,6 +778,7 @@ const Select = forwardRef(
optionRender={option => <Space>{option.label || option.value}</Space>}
oneLine={oneLine}
css={props.css}
dropdownAlign={DROPDOWN_ALIGN_BOTTOM}
{...props}
showSearch={shouldShowSearch}
ref={ref}

View File

@@ -19,7 +19,7 @@
import { LabeledValue as AntdLabeledValue } from 'antd/es/select';
import { t } from '@apache-superset/core';
import { rankedSearchCompare } from '../../utils/rankedSearchCompare';
import { RawValue } from './types';
import { RawValue, SelectProps } from './types';
export const MAX_TAG_COUNT = 4;
@@ -33,6 +33,12 @@ export const SELECT_ALL_VALUE: RawValue = t('Select All');
export const VIRTUAL_THRESHOLD = 20;
export const DROPDOWN_ALIGN_BOTTOM: SelectProps['dropdownAlign'] = {
points: ['tl', 'bl'],
offset: [0, 4],
overflow: { adjustX: 0, adjustY: 1 },
};
export const SELECT_ALL_OPTION = {
value: SELECT_ALL_VALUE,
label: String(SELECT_ALL_VALUE),

View File

@@ -71,6 +71,7 @@ export type AntdExposedProps = Pick<
| 'virtual'
| 'getPopupContainer'
| 'menuItemSelectedIcon'
| 'dropdownAlign'
>;
export type SelectOptionsType = Exclude<AntdProps['options'], undefined>;