File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
superset-frontend/packages/superset-ui-core/src/components/Select Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ import {
6363} from './styles' ;
6464import {
6565 DEFAULT_SORT_COMPARATOR ,
66+ DROPDOWN_ALIGN_BOTTOM ,
6667 EMPTY_OPTIONS ,
6768 MAX_TAG_COUNT ,
6869 TOKEN_SEPARATORS ,
@@ -776,6 +777,7 @@ const Select = forwardRef(
776777 optionRender = { option => < Space > { option . label || option . value } </ Space > }
777778 oneLine = { oneLine }
778779 css = { props . css }
780+ dropdownAlign = { DROPDOWN_ALIGN_BOTTOM }
779781 { ...props }
780782 showSearch = { shouldShowSearch }
781783 ref = { ref }
Original file line number Diff line number Diff line change 1919import { LabeledValue as AntdLabeledValue } from 'antd/es/select' ;
2020import { t } from '@superset-ui/core' ;
2121import { rankedSearchCompare } from '../../utils/rankedSearchCompare' ;
22- import { RawValue } from './types' ;
22+ import { RawValue , SelectProps } from './types' ;
2323
2424export const MAX_TAG_COUNT = 4 ;
2525
@@ -33,6 +33,12 @@ export const SELECT_ALL_VALUE: RawValue = t('Select All');
3333
3434export const VIRTUAL_THRESHOLD = 20 ;
3535
36+ export const DROPDOWN_ALIGN_BOTTOM : SelectProps [ 'dropdownAlign' ] = {
37+ points : [ 'tl' , 'bl' ] ,
38+ offset : [ 0 , 4 ] ,
39+ overflow : { adjustX : 0 , adjustY : 1 } ,
40+ } ;
41+
3642export const SELECT_ALL_OPTION = {
3743 value : SELECT_ALL_VALUE ,
3844 label : String ( SELECT_ALL_VALUE ) ,
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ export type AntdExposedProps = Pick<
7171 | 'virtual'
7272 | 'getPopupContainer'
7373 | 'menuItemSelectedIcon'
74+ | 'dropdownAlign'
7475> ;
7576
7677export type SelectOptionsType = Exclude < AntdProps [ 'options' ] , undefined > ;
You can’t perform that action at this time.
0 commit comments