Skip to content

[EuiBasicTable] onChange parameter type unable to be determined leads to anyΒ #4011

@alvarezmelissa87

Description

@alvarezmelissa87

When using EuiBasicTableProps<T>['onChange'] type - onChange type has multiple options

(criteria: Criteria<T>) => void; | (criteria: CriteriaWithPagination<T>) => void; | undefined

This prevents the onChange parameters from being typed correctly and is implicitly set to any which causes TypeScript to complain. Neither Criteria<T> or CriteriaWithPagination<T> are exported. onChange param has to be explicitly typed.

e.g.
const onTableChange: EuiBasicTableProps<TypeOfItem>['onChange'] = (param) => { ...
Param is incorrectly set as any.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions