diff --git a/CHANGELOG.md b/CHANGELOG.md index 69d4cf7ae46..baf6c159505 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Converted `EuiFilePicker` to TypeScript ([#2832](https://github.com/elastic/eui/issues/2832)) +- Exported `EuiSelectOptionProps` type ([#2830](https://github.com/elastic/eui/pull/2830)) ## [`19.0.0`](https://github.com/elastic/eui/tree/v19.0.0) diff --git a/src/components/form/select/index.ts b/src/components/form/select/index.ts index 911289c29b4..e66523868f6 100644 --- a/src/components/form/select/index.ts +++ b/src/components/form/select/index.ts @@ -1 +1 @@ -export { EuiSelect, EuiSelectProps } from './select'; +export { EuiSelect, EuiSelectProps, EuiSelectOptionProps } from './select'; diff --git a/src/components/form/select/select.tsx b/src/components/form/select/select.tsx index 1f8478a1904..8b6606c3496 100644 --- a/src/components/form/select/select.tsx +++ b/src/components/form/select/select.tsx @@ -13,13 +13,14 @@ import { import { EuiValidatableControl } from '../validatable_control'; import { EuiFormControlLayoutIconsProps } from '../form_control_layout/form_control_layout_icons'; -interface Option extends OptionHTMLAttributes { +export interface EuiSelectOptionProps + extends OptionHTMLAttributes { text: React.ReactNode; } export type EuiSelectProps = SelectHTMLAttributes & CommonProps & { - options?: Option[]; + options?: EuiSelectOptionProps[]; isInvalid?: boolean; fullWidth?: boolean; isLoading?: boolean;