Skip to content

[Table] virtualize.measureElement is typed but not functional - DOM binding missing #6101

@yangg

Description

@yangg

Package

v4.x

Description

When using UTable with virtualize enabled, the measureElement option is accepted in TypeScript definitions but does not work at runtime. The callback is never invoked, and dynamic row heights cannot be measured.
This prevents accurate virtual scrolling for tables with highly variable row heights (e.g., expandable rows, rich content, images).

Additional context

<template>
  <UTable
    virtualize
    :data="rows"
    :columns="columns"
    :virtualize="{
      estimateSize: () => 65,
      measureElement: (el) => {
        console.log('❌ This never logs') // 永远不会执行
        return el?.getBoundingClientRect().height || 65
      }
    }"
    class="h-[500px]"
  />
</template>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageAwaiting initial review and prioritizationv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions