Skip to content

[EuiSelectable] onChange needs to account for EuiSelectableOption generic type #3966

Closed

Description

@thompsongl

Adding a generic to EuiSelectableOption to support extensions in EuiSelectableTemplateSitewide causes a type mismatch when the options are extended with a required property.

For example:

type FieldOptions = Array<EuiSelectableOption<{ value: string }>>;

will cause a type mismatch with EuiSelectable.onChange, which is typed as (options: EuiSelectableOption[]) => void (the default {} generic value does not satisfy the required value property).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions