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

Fix MdTable.vue numberOfRows bug #320

Merged
merged 2 commits into from
Jan 11, 2017

Conversation

pablohpsilva
Copy link

Bug

It happened when I removed one or more rows from the table and clicked on the "select all" checkbox. The number shown was the original data array size, not the new one (after deleting some itens). Example:

nutrition = [1,2,3,4,5];
numberOfRows = 5;

nutrition.splice(1,1);

nutrition = [1,3,4,5];
numberOfRows = 5; // this is the bug. it should be 4, not 5.

Fix

File: mdTable.vue

  watch: {
    data() {
      this.numberOfRows = this.data.length;
    }
  },

This will guarantee the numberOfRows is always up to date.

@marcosmoura
Copy link
Member

Cool. Sounds good! Merged!

@marcosmoura marcosmoura merged commit 06e404c into vuematerial:master Jan 11, 2017
@marcosmoura marcosmoura modified the milestones: v0.7.0, v0.6.4 Jan 11, 2017
marcosmoura added a commit that referenced this pull request Jan 23, 2017
* origin/master:
  fix import names (#345)
  add gitter channel URL
  add gitter badge
  fix comment
  add Gitter Channel
  update the number of rows if the data set changes on mdTable (#320)
marcosmoura added a commit that referenced this pull request Feb 8, 2017
* 'master' of https://github.com/marcosmoura/vue-material: (680 commits)
  update supported browsers
  fix import names (#345)
  add gitter channel URL
  add gitter badge
  fix comment
  add Gitter Channel
  update the number of rows if the data set changes on mdTable (#320)
  [release] 0.6.3
  [build] 0.6.3
  fix standalone build #312
  [release] 0.6.2
  [build] 0.6.2
  fix alias for webpack
  [release] 0.6.1
  [build] 0.6.1
  remove ignore on bundle
  fix md-icon-button with pallete colors inside cards #307
  [release] 0.6.0
  [build] 0.6.0
  fix one line dialogs in certain browsers #219
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants