vuetifyjs / vuetifyjs/vuetify

[Bug Report][4.1.8] VDataTable: Striping does not work when using expansion with expanded-slot

Open
#23,091 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C: VDataTable S: maybe T: bug
Dominant language
TypeScript
Stars
41k
Forks
7.1k
Avg merge
1d 21h
Merged PRs (30d)
11

Description

Environment

Vuetify Version: 4.1.8
Vue Version: 3.5.41
OS: Linux

Steps to reproduce
  1. Open the reproduction link
  2. Observe that all main items share the same striping color (no striping visible)
  3. Expand one or more items
  4. Observe that all expansion areas share the same striping color (opposite color of all main items)
Expected Behavior

Striping should always happen on the level of main items. If a main item is expanded, the expanded area should share the same striping as its related main item.
The next main item (together with its expanded area) should then receive the opposite striping-color.

Actual Behavior

All main items have the same striping color and all expansion areas have the opposite striping color.
Therefore, there is no striping between main items (especially when all items are closed / not expanded).

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

The expanded-slot internally is rendered as a dedicated tr-element. As striping is implemented via tr:nth-child, it receives the opposing striping color than the tr-element of its main item. This causes the next main item to have the same striping color again as the previous main item thereby bypassing the intended striping of main items.

Images

https://cdn.cosmicjs.com/2dec7730-94b1-11f1-9bda-cb7b6d8624bb-tr-elements.png

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the VDataTable implementation and reproduce the issue using the linked Vuetify Playground example, focusing on expanded-slot rendering and row striping. Verify that striping is applied per main item, with each expanded area sharing its parent item's color and the next main item alternating.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.