Skip to content

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

Open

Description

@RungryCoder

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: VDataTableS: maybeFunctionality that we are consideringT: bugFunctionality that does not work as intended/expected

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions