Skip to content

[EuiFlyout] onClose invoked with unexpected parameter #2894

@pickypg

Description

@pickypg

The definition for onClose as part of EuiFlyout is () => void. I was taking advantage of this by having my not-close button invoke the same method with an optional parameter.

However, I was surprised when certain closure's were triggering issues in my code. Upon inspection, it kind of became clear that I was receiving the events from the button clicks:

onClick={onClose}

This is easy to workaround: just pass in the function as () => actualCallback(), but it was definitely unexpected.

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