Skip to content

Commit e1f8144

Browse files
committed
fix(Select): types
1 parent 5e07b9e commit e1f8144

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/components/fields/Select/Select.tsx

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import {
5959
StyledSection as ListSectionWrapper,
6060
} from '../../actions/Menu/styled';
6161
import { CollectionItem } from '../../CollectionItem';
62-
import { Item } from '../../content/Item';
62+
import { CubeItemProps, Item } from '../../content/Item';
6363
import { useFieldProps, useFormProps, wrapWithField } from '../../form';
6464
import { DisplayTransition } from '../../helpers';
6565
import { Portal } from '../../portal';
@@ -182,7 +182,7 @@ export interface CubeSelectBaseProps<T>
182182
suffix?: ReactNode;
183183
/** Description text for the trigger. Note: Different from field-level description. */
184184
description?: ReactNode;
185-
descriptionPlacement?: 'inline' | 'block' | 'auto';
185+
descriptionPlacement?: 'inline' | 'block';
186186
/** Keyboard shortcut that triggers the select when pressed */
187187
hotkeys?: string;
188188
/**
@@ -694,20 +694,7 @@ function Option({ item, state, styles, shouldUseVirtualFocus, size }) {
694694
descriptionPlacement,
695695
tooltip,
696696
styles: itemStyles,
697-
} = ((item as any)?.props || {}) as {
698-
description?: React.ReactNode;
699-
icon?: React.ReactElement;
700-
prefix?: React.ReactNode;
701-
suffix?: React.ReactNode;
702-
rightIcon?: React.ReactElement;
703-
styles?: Styles;
704-
descriptionPlacement?: 'inline' | 'block' | 'auto';
705-
tooltip?:
706-
| string
707-
| boolean
708-
| (Omit<CubeTooltipProviderProps, 'children'> & { auto?: boolean });
709-
qa?: string;
710-
};
697+
} = ((item as any)?.props || {}) as CubeItemProps;
711698

712699
return (
713700
<OptionItem

0 commit comments

Comments
 (0)