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

Table header does not hide when column disapears #1347

Closed
fimdomeio opened this issue Dec 26, 2017 · 2 comments · Fixed by #1354
Closed

Table header does not hide when column disapears #1347

fimdomeio opened this issue Dec 26, 2017 · 2 comments · Fixed by #1354
Labels

Comments

@fimdomeio
Copy link

Table header does not react correctly when hiding collumns. Label stays present

Steps to reproduce

            <md-switch v-model="tableFields.new_code">New Code</md-switch>
(...)

        <md-table-row slot="md-table-row" slot-scope="{ item }">
          <md-table-cell md-label="New Code" md-sort-by="new_code" v-if="tableFields.new_code">{{ item.new_code }}</md-table-cell>
          <md-table-cell md-label="Old Code" md-sort-by="old_code" v-if="tableFields.old_code">{{ item.old_code }}</md-table-cell>
          <md-table-cell md-label="Title" md-sort-by="title" v-if="tableFields.title">{{ item.title }}</md-table-cell>
          <md-table-cell md-label="Materials" md-sort-by="materials" v-if="tableFields.materials">{{ item.materials }}</md-table-cell>
          <md-table-cell md-label="Technic" md-sort-by="technic" v-if="tableFields.technic">{{ item.technic }}</md-table-cell>
          <md-table-cell md-label="Year" md-sort-by="creation_year" v-if="tableFields.creation_year" md-numeric>{{ item.creation_year }}</md-table-cell>
        </md-table-row>

...
  data() {
    return {
      tableFields: {
        new_code: true,
        old_code: false,
        title: true,
        materials: false,
        technic: false,
        creation_year: true,
      },
}

When hiding new_code, content disapears but not the header

Which browser?

I tested in Firefox and Chrome. I think this is not related to a specific browser.

What is expected?

Header column should disapear

Reproduction Link

I could not setup a proper codePen but I'll try again if needed

@fimdomeio
Copy link
Author

captura de ecra 2017-12-26 as 12 58 01

@VdustR
Copy link
Member

VdustR commented Dec 26, 2017

Reproduction: https://codepen.io/VdustR/pen/BJpWOq

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