vuetifyjs / vuetifyjs/vuetify

[Feature Request] Add colSpanAttrs on group.headers slot properties

Open
#11,384 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem to solve

It is not possible to determine the column span value needed to create the correct width for the group template unless you copy/paste code from VDataTable.

Proposed solution

The VDataTable correctly calculates the attribute for colspan for the element here:

https://github.com/vuetifyjs/vuetify/blob/e6ebf4f29011dcf59e6b977010a44e5394a2e296/packages/vuetify/src/components/VDataTable/VDataTable.ts#L351-L354

If this.colspanAttrs() could simply be passed into the props for the slot, then the slot template can just use those attributes as well.

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 in packages/vuetify/src/components/VDataTable/VDataTable.ts around lines 351-354, where VDataTable calculates the colspan attributes. Trace the group.headers slot properties and determine how those attributes can be exposed there. Done means the group template can use colSpanAttrs to create the correct-width without copying VDataTable code.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.