Skip to content

[EuiSelectable] Doesn't render correctly in jsdom env #8740

Closed

Description

@weronikaolejniczak

Describe the bug
When EuiSelectable is rendered in a jsdom environment, for some reason it ends up rendered as:

<div class="euiSelectable css-1tyip8k-euiSelectable">
  <div style="min-width: 20rem;">
    <div
      class="euiSelectableList css-1tl92f6-euiSelectableList"
      data-test-subj="euiSelectableList"
    >
      <div style="overflow: visible; width: 0px;" />
      <div class="resize-triggers">
        <div class="expand-trigger">
          <div style="width: 1px; height: 1px;" />
        </div>
        <div class="contract-trigger" />
      </div>
    </div>
  </div>
</div>
</div>

with no options. Applying listProps={{ isVirtualized: false }} works:

Image

but it's not something that should be done on consumer side. EUI disables virtualization in test environments to prevent this type of behavior. Apparently, something is not working quite right.

Impact and severity
It's not an end-user issue because EuiSelectable is correctly rendered in the browser. It's a Cloud UI developer issue.

Environment and versions

  • EUI version: 102.3.0
  • React version: 18.0.0
  • Kibana version (if applicable): ~
  • Browser: ~
  • Operating System: MacOS

Minimum reproducible sandbox
Codesandbox

To Reproduce
If unable to access the above-mentioned sandbox, here are the steps to reproduce the behavior:

  1. Setup the environment: React v18, EUI, Jest, RTL, jsdom env
  2. Render EuiSelectable.
  3. Write a test asserting EuiSelectable options.

Options are not found and screen.debug() produces empty divs.

Expected behavior
EuiSelectable should render correctly in jsdom environment, i.e. options should be targetable.

Screenshots
Image

Additional context
~

Activity

  1. added
    ⚠️ needs validation
    on Jun 4, 2025
  2. tkajtoch commented on Jun 5, 2025

    @tkajtoch
    Contributor

    Estimated as 3 points and set high priority. This needs looking into, it's likely related to the virtualization library or is affected by the concurrent rendering happening in React 18. In any case, there are unknowns.

  3. changed the title [-]Fix `EuiSelectable` not rendering correctly in jsdom env[/-] [+][EuiSelectable] Doesn't render correctly in jsdom env[/+] on Jul 25, 2025
  4. removed
    ⚠️ needs validation
    on Dec 29, 2025
  5. itamarbadass commented on Jan 5, 2026

    @itamarbadass

    Including here the stack trace from the console when clicking on an item in a popover when settings the isVirtualized property to false:

    chunk-UXNFKUP4.js?v=7116e3b5:16718 
    Uncaught SyntaxError: Failed to execute 'querySelector' on 'Element': '#:r1b:_listbox_option-6' is not a valid selector.
        at EuiSelectableList2.componentDidUpdate (@elastic_eui.js?v=7116e3b5:133409:139)
        at commitLayoutEffectOnFiber (chunk-UXNFKUP4.js?v=7116e3b5:17101:36)
        at commitLayoutMountEffects_complete (chunk-UXNFKUP4.js?v=7116e3b5:18030:17)
        at commitLayoutEffects_begin (chunk-UXNFKUP4.js?v=7116e3b5:18019:15)
        at commitLayoutEffects_begin (chunk-UXNFKUP4.js?v=7116e3b5:18000:19)
        at commitLayoutEffects_begin (chunk-UXNFKUP4.js?v=7116e3b5:18000:19)
        at commitLayoutEffects (chunk-UXNFKUP4.js?v=7116e3b5:17970:11)
        at commitRootImpl (chunk-UXNFKUP4.js?v=7116e3b5:19406:13)
        at commitRoot (chunk-UXNFKUP4.js?v=7116e3b5:19330:13)
        at performSyncWorkOnRoot (chunk-UXNFKUP4.js?v=7116e3b5:18948:11)
    
    The above error occurred in the <EuiSelectableList2> component:
    
        at EuiSelectableList2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:133072:5)
        at EuiI18n2
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:44465:22
        at FocusLockUI (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:44557:48)
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:44834:20
        at EuiFocusTrapClass2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:46855:5)
        at EuiFocusTrap2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:46799:27)
        at div
        at EuiMutationObserver2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:47108:5)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:44465:22
        at FocusLockUI (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:44557:48)
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:44834:20
        at EuiFocusTrapClass2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:46855:5)
        at EuiFocusTrap2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:46799:27)
        at EuiPortalClass2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:38588:5)
        at EuiPortal2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:38564:27)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at EuiOutsideClickDetector2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:47252:5)
        at EuiPopover2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:47982:5)
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at EuiSelectable2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:133891:5)
        at div
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at form
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:44465:22
        at FocusLockUI (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:44557:48)
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:44834:20
        at EuiFocusTrapClass2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:46855:5)
        at EuiFocusTrap2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:46799:27)
        at EuiPortalClass2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:38588:5)
        at EuiPortal2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:38564:27)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at FilterContent (https://local.admin.qa.cld.elstc.co:5173/src/apps/autoops/pages/NotificationsSettings/components/FilterContent/FilterContent.tsx?t=1767613072518:32:22)
        at NotificationsSettings (https://local.admin.qa.cld.elstc.co:5173/src/apps/autoops/pages/NotificationsSettings/NotificationsSettings.tsx?t=1767613072518:20:20)
        at Suspense
        at EuiErrorBoundary2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:113714:5)
        at lazyRender
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at section
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at _EuiPageSection2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/@elastic_eui.js?v=7116e3b5:126018:53)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at main
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at div
        at https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1347:45
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at Layout (https://local.admin.qa.cld.elstc.co:5173/src/apps/autoops/modules/layouts/Layout/Layout.tsx:13:20)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at AutoOpsRoutes
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at R (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/launchdarkly-react-client-sdk.js?v=7116e3b5:2160:5)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at Suspense
        at Shell (https://local.admin.qa.cld.elstc.co:5173/src/routes.tsx?t=1767613072518:51:20)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at AppRouter
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at ThemeProvider2 (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-KFL2ZA5W.js?v=7116e3b5:1377:22)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
        at commitLayoutMountEffects_complete (https://local.admin.qa.cld.elstc.co:5173/node_modules/.vite/deps/chunk-UXNFKUP4.js?v=7116e3b5:18032:17)
    
    React will try to recreate this component tree from scratch using the error boundary you provided, EuiErrorBoundary2.
    
  6. seialkali commented on Jan 15, 2026

    @seialkali

    @weronikaolejniczak I wanted to report that I am getting the same errors in the browser when running Kibana locally. I am using EuiSelectable with listProps={{ isVirtualized: false }}. The list renders, but when I try to select an option the app crashes.

    I'm using EuiSelectable with listProps={{ isVirtualized: false }} in other components without issue. I've tried to isolate what the exact difference is that's causing the error, but I haven't been able to confirm anything. In case it's helpful, I've added the changes I made to a draft PR so you can see/run the exact code I'm using which is erroring: elastic/kibana#249265

    Here is a video of the error:

    Screen.Recording.2026-01-15.at.16.44.20.mov

    Here are the stack traces:

    Uncaught SyntaxError: Failed to execute 'querySelector' on 'Element': '#:r1o:_listbox_option-1' is not a valid selector.
        at EuiSelectableList.componentDidUpdate (selectable_list.js:488:1)
        at commitLayoutEffectOnFiber (react-dom.development.js:23333:1)
        at commitLayoutMountEffects_complete (react-dom.development.js:24688:1)
        at commitLayoutEffects_begin (react-dom.development.js:24674:1)
        at commitLayoutEffects (react-dom.development.js:24612:1)
        at commitRootImpl (react-dom.development.js:26823:1)
        at commitRoot (react-dom.development.js:26682:1)
        at performSyncWorkOnRoot (react-dom.development.js:26117:1)
        at flushSyncCallbacks (react-dom.development.js:12042:1)
        at flushSyncCallbacksOnlyInLegacyMode (react-dom.development.js:12021:1)
    
    The above error occurred in the <EuiSelectableList> component:
    
        at EuiSelectableList (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:366875:86)
        at EuiI18n
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiSelectable (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:365936:86)
        at div
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiFormRow (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:247103:24)
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiPanel (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:236058:23)
        at div
        at EuiResizeObserver (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:228187:86)
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiContextMenuPanelClass (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:252277:86)
        at Render (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:205255:75)
        at div
        at EuiMutationObserver (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:235521:86)
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiPanel (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:236058:23)
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiPopoverPanel (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:235966:23)
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:230886:50
        at FocusLockUI (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:231748:60)
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:230838:49
        at EuiFocusTrapClass (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:230199:86)
        at EuiFocusTrap (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:230193:119)
        at EuiPortalClass (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:228458:86)
        at EuiPortal (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:228452:118)
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiPopover (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:235007:86)
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiFlexItemInternal (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:243446:23)
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiFlexGroupInternal (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:243026:24)
        at SelectInferenceIdContent (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.2.js:24144:21)
        at UseFieldComp (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/plugin/esUiShared/1.0.0/esUiShared.plugin.js:10835:64)
        at SelectInferenceId (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.2.js:24117:21)
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at div
        at http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:201286:66
        at EuiPanel (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:236058:23)
        at form
        at formWrapper
        at FormProvider (http://localhost:5601/qgz/XXXXXXXXXXXX/bundles/plugin/esUiShared/1.0.0/esUiShared.plugin.js:9313:3)
        at FormDataContextProvider
    
  7. weronikaolejniczak commented on Jan 16, 2026

    @weronikaolejniczak
    ContributorAuthor

    @seialkali I looked into the issue and I have found why unvirtualized EuiSelectable crashes for you in some cases, not in others. The reason is when the list is not virtualized, the component attemps to scroll the active option into view and it queries the element with an id selector (#id). Well, in React 18 the generated IDs (via useId) can contain colons (:r1o: like in your stack trace).: denotes a pseudo-class in CSS selector and so it causes a syntax error when used without escaping. The fix is to update id selector to attribute selector ([id="id"]).

    That being said, it's not related to this issue. I'll open a PR with a fix shortly.

    cc @itamarbadass

    For the "options do not display in jsdom" issue, this is somewhat expected. In jsdom elements typically have 0 width and hight. EuiAutoSizer wraps EuiSelectable for virtualization by default. Because auto-sizer measures the container and sees 0, react-window ends up not rendering any options. EuiAutoSizer has a testenv component variant for this exact purpose which returns a simple div instead of react-virtualized-auto-sizer but something here is not quite right still. The quickest solution would be to disable virtualization in the component code if it's test environment (adding a testenv variant would not be as trivial). But I need to debug more in-depth in case there's an issue with the auto-sizer.

  8. seialkali commented on Jan 16, 2026

    @seialkali

    @weronikaolejniczak Thank you for looking into it and explaining what the issue is! I'll keep an eye out for the fix. Thanks 🙂

  9. itamarbadass commented on Jan 18, 2026

    @itamarbadass

    Thank you for you help! @weronikaolejniczak

  10. weronikaolejniczak commented on Jan 19, 2026

    @weronikaolejniczak
    ContributorAuthor

    Hey both @seialkali @itamarbadass 👋🏻 I have a PR open for the SyntaxError fix: #9326

  11. weronikaolejniczak commented on Jan 20, 2026

    @weronikaolejniczak
    ContributorAuthor

    Hey @itamarbadass, I'm coming back with some conclusions. I weighed our options and while it is technically feasible to set isVirtualized to false by default in EuiSelectable, I don't think this should happen directly in our code. What e.g. MUI does is they expose disableVirtualization (the negative of our isVirtualized basically) and they add that it's especially useful for testing in jsdom. This issue in their repo might be helpful. That's what I would recommend moving forward, I'll make sure to add it to EuiSelectable documentation as a part of this task.

    If you have any doubts about how to mock this, I'll gladly help 🙏🏻

    cc @zinckiwi

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

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions