Add Vue.js support for "enable / disable selected" grid feature
This commit is contained in:
parent
847136b69c
commit
ebc22d845a
2 changed files with 109 additions and 13 deletions
|
@ -93,6 +93,13 @@ Vue.component('grid-filter', GridFilter)
|
|||
let TailboneGrid = {
|
||||
template: '#tailbone-grid-template',
|
||||
|
||||
computed: {
|
||||
// note, can use this with v-model for hidden 'uuids' fields
|
||||
selected_uuids: function() {
|
||||
return this.checkedRowUUIDs().join(',')
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
getRowClass(row, index) {
|
||||
|
@ -232,8 +239,8 @@ let TailboneGrid = {
|
|||
},
|
||||
|
||||
checkedRowUUIDs() {
|
||||
var uuids = [];
|
||||
for (var row of this.$data.checkedRows) {
|
||||
let uuids = []
|
||||
for (let row of this.$data.checkedRows) {
|
||||
uuids.push(row.uuid)
|
||||
}
|
||||
return uuids
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue