Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import {
} from './styles';
import {
DEFAULT_SORT_COMPARATOR,
DROPDOWN_ALIGN_BOTTOM,
EMPTY_OPTIONS,
MAX_TAG_COUNT,
TOKEN_SEPARATORS,
Expand Down Expand Up @@ -776,6 +777,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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import { LabeledValue as AntdLabeledValue } from 'antd/es/select';
import { t } from '@superset-ui/core';
import { rankedSearchCompare } from '../../utils/rankedSearchCompare';
import { RawValue } from './types';
import { RawValue, SelectProps } from './types';

export const MAX_TAG_COUNT = 4;

Expand All @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export type AntdExposedProps = Pick<
| 'virtual'
| 'getPopupContainer'
| 'menuItemSelectedIcon'
| 'dropdownAlign'
>;

export type SelectOptionsType = Exclude<AntdProps['options'], undefined>;
Expand Down
Loading