Skip to content

[EuiFlyout] Support disabling leadingActions/trailingActions items in EuiFlyoutMenu #9934

Description

@davismcphee

Requestor

Me and @kertal!

Problem Statement

EuiFlyoutMenuAction (used for EuiFlyoutMenu's leadingActions/trailingActions) has no isDisabled option. Consumers sometimes want to keep an action visible but disabled, with a tooltip explaining why it's unavailable, and there's currently no way to do that.

Proposed Solution

Add isDisabled to EuiFlyoutMenuAction, and allow the existing toolTipContent prop to display a disabled reason.

Use Case

Discover's document flyout header uses trailingActions for a "Share direct link" button that's sometimes unavailable (insufficient permissions, unresolved row), and we want users to know why it's unavailable in these cases.

Value / Impact

Better UX/a11y for any conditionally unavailable flyout menu action.

Urgency

Medium, ideally sooner than later.

Do alternatives or workarounds exist?

Partially. Workarounds exist (e.g. keeping the action enabled and showing a toast on click) but aren't great.

Related code or customizations

https://github.com/elastic/kibana/blob/main/src/platform/plugins/shared/discover/public/application/main/components/document_flyout/discover_document_flyout.tsx, discussed in elastic/kibana#282175 (comment)

Activity

  1. self-assigned this
    on Aug 21, 2026
  2. davismcphee commented on Aug 27, 2026

    @davismcphee
    ContributorAuthor

    @tsullivan What are the chances we could include isLoading with this as well? Our use case does async work when clicking the button, and there was a design suggestion to use a loading state for it. I can instead open a separate dedicated issue for it if preferred.

    cc @l-suarez

  3. tsullivan commented on Aug 27, 2026

    @tsullivan
    Member

    @davismcphee putting a loading indicator into the menu bar might be tough - there will be cases where the flyout has no menu actions, pagination or history control and will auto-hide itself.

    if (flyoutMenuDisplayMode === MENU_DISPLAY_AUTO) return menuHasContent;

  4. davismcphee commented on Aug 28, 2026

    @davismcphee
    ContributorAuthor

    @tsullivan sorry, I didn't explain that well. What I meant was exposing isLoading on header menu actions alongside isDisabled to set the button state to loading.

  5. ryankeairns commented on Aug 28, 2026

    @ryankeairns
    Contributor

    Design check: nothing materially new/different here. Sounds like standard loading and disabled states.
    Let me know if I am overlooking anything.

  6. tsullivan commented on Aug 31, 2026

    @tsullivan
    Member

    Makes sense to me. I confirmed that EuiButtonIcon supports isDisabled and isLoading ✅

  7. davismcphee commented on Sep 2, 2026

    @davismcphee
    ContributorAuthor

    Thanks both!

  8. tsullivan commented on Sep 2, 2026

    @tsullivan
    Member

    We should also support href and allow Cmd+Click to work (should open something in a new tab)

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions