mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-14 18:23:10 +00:00
update the number of rows if the data set changes on mdTable (#320)
* Fix on mdTable numberOfRows and numberOfSelected * Fix on mdTable numberOfRows and numberOfSelected
This commit is contained in:
parent
7de412c0bd
commit
06e404c992
1 changed files with 8 additions and 0 deletions
|
|
@ -41,6 +41,14 @@
|
|||
this.$emit('select', this.selectedRows);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
data() {
|
||||
this.numberOfRows = this.data.length;
|
||||
},
|
||||
selectedRows() {
|
||||
this.numberOfSelected = Object.keys(this.selectedRows).length;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.parentCard = getClosestVueParent(this.$parent, 'md-table-card');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue