Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] fix(VDataTable): fix header column widths not being respected #8296

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

nekosaur
Copy link
Member

@nekosaur nekosaur commented Aug 4, 2019

Description

setting both width and min-width as styles on header row was the only
way I could get a consistent result

Motivation and Context

closes #5072, #7623

How Has This Been Tested?

Markup:

<template>
  <v-container>
    <v-data-table
      :headers="headers"
      :items="items"
      :items-per-page="5"
      class="elevation-1"
      show-select
    ></v-data-table>
  </v-container>
</template>

<script>
export default {
  data: () => ({
     headers: [
      { text: 'Firstname', value: 'firstname', width: '300px' },
      { text: 'Lastname', value: 'lastname' },
      { text: 'Starship Name', value: 'starship', width:'400px' },
      { text: 'Nationality', value: 'nationality' },
      { text: 'Hobbies', value: 'hobbies' },
       { text: 'Likes', value: 'likes' },
       { text: 'Dislikes', value: 'dislikes' },
    ],
    items: [
      { firstname: 'Jean-Luc', lastname: 'Picard', rank: 'Captain', starship: 'Enterprise NCC1701D', nationality: 'French', hobbies: 'Archaeology', likes:'Wine', dislikes:'Borg' }
    ]
  })
}
</script>

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and breaking changes).
  • My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)
  • I've added new examples to the kitchen (applies to new features and breaking changes in core library)

setting both width and min-width as styles on header row was the only
way I could get a consistent result

closes #5072
@nekosaur nekosaur added the T: bug Functionality that does not work as intended/expected label Aug 4, 2019
@nekosaur nekosaur added this to the v2.0.x milestone Aug 4, 2019
@nekosaur nekosaur self-assigned this Aug 4, 2019
@johnleider johnleider added the C: VDataTable VDatatable label Aug 12, 2019
@johnleider johnleider merged commit a18cc68 into master Aug 12, 2019
@johnleider johnleider deleted the fix/5072-data-table-column-width branch August 12, 2019 18:46
@lock lock bot locked as resolved and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: VDataTable VDatatable T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Data-table headers width doesn't work
3 participants