Skip to content

[Emotion] Memoize EuiFormControlLayout icon styles #10154

Description

@weronikaolejniczak

Part of #10147

Switch the eui*Styles() calls to useEuiMemoizedStyles. The generator must be a static function of the theme. If it also takes another argument, keep that dynamic part outside the memoized function.

No changelog.

src/components/form/form_control_layout/form_control_layout_icons.tsx calls euiFormControlLayoutIconsStyles.

Activity

  1. added
    help wanted
    on Oct 5, 2026
  2. github-actions commented on Oct 5, 2026

    @github-actions

    👋 Thank you for your suggestion or request! While the EUI team agrees that it's valid, it's unlikely that we will prioritize this issue on our roadmap. We'll leave the issue open if you or anyone else in the community wants to implement it by contributing to EUI. If not, this issue will auto close in one year.

  3. Anshuman-Prakash commented on Oct 6, 2026

    @Anshuman-Prakash
    Contributor

    I'd like to pick this up. Plan: switch form_control_layout_icons.tsx to useEuiMemoizedStyles(euiFormControlLayoutIconsStyles), keeping any non-theme inputs outside the memoized generator, and verify the existing tests/snapshots are unchanged.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    emotionhelp wantedperformancetech debt

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions