#24914·element-plus

[Component] [select] Memory leak in <el-table> when using <el-select> inside a scoped slot with v-if toggling

Author: KerravitarrCreated Sep 23, 2026Updated Sep 24, 2026

Bug Type: Component

Environment

  • Vue Version: 3.6.0-rc.9
  • Element Plus Version: 2.14.6
  • Browser / OS: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:156.0) Gecko/20100101 Firefox/156.0
  • Build Tool: Webpack

Reproduction

Related Component

  • el-select

Reproduction Link

Element Plus Playground

Steps to reproduce

  1. Create a parent component containing an (or any wrapper) toggled by a dynamic condition using v-if.
  2. Inside that wrapper, render an component.
  3. Define an and place an inside its default scoped slot (<template #default="scope">).
  4. Rapidly toggle the v-if condition of the wrapper container back and forth.
  5. Record the heap snapshots using DevTools Performance/Memory tab.

What is Expected?

When the parent container is destroyed via v-if, the and all underlying child components inside its slots (specifically ) should be fully unmounted and garbage collected. Memory consumption should remain stable.

What is actually happening?

Every time the component is unmounted and remounted, JS heap memory usage grows rapidly and is never released. The internal Popper/Dropdown instances created by seem to lose their lifecycle connection when wrapped inside a table slot, failing to execute proper cleanup hooks during unmounting. This detaches the DOM nodes and causes a severe memory leak.

Additional comments

During investigation, I isolated the issue and performed the following tests using the latest versions of Vue 3 and Element Plus:

  • Test 1: Toggling an isolated outside the table via v-if does not leak memory. The issue only manifests when the select is rendered inside an slot.
  • Test 2: Replacing with inside the exact same table slot does not leak memory.
  • Test 3: Replacing with a native HTML <select> inside the table slot does not leak memory.
  • Test 4: Trying results in the exact same memory leak behavior.
  • Test 5: Forcing strict re-rendering by applying a unique :key attribute to the table did not resolve or mitigate the leak.

It heavily implies that the issue is specific to the cleanup phase of Popper.js / Floating UI dropdown engines when unmounting nested VNode slot trees inside table structures.

Source: element-plus/element-plus