Skip to content

Conversation

@plycos
Copy link

@plycos plycos commented Dec 7, 2025

πŸ”— Linked issue

Resolves #4968

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The data-selectable attribute on table rows was not respecting the rowSelectionOptions.enableRowSelection option. When enableRowSelection is defined (e.g., to
conditionally disable selection on certain rows), the attribute should reflect whether each individual row can be selected via row.getCanSelect().

Before: data-selectable only checked for onSelect, onHover, or onContextmenu props
After: data-selectable first checks if enableRowSelection is defined, and if so, uses row.getCanSelect(), otherwise falls back to the original behavior

This fix ensures that rows with disabled selection get data-selectable="false".

Testing: added tests 'data-selectable attribute with rowSelectionOptions.enableRowSelection' and 'data-selectable attribute fallback behavior' to test that the new behavior and old behavior work correctly.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 7, 2025

npm i https://pkg.pr.new/@nuxt/ui@5611

commit: df413b2

@plycos plycos changed the title fix Table to respect enableRowSelection in data-selectable attribute fix(Table): respect enableRowSelection in data-selectable attribute Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UTable row data-selectable attribute not aligned with TanStack API

1 participant