Add Vue.js support for "enable / disable selected" grid feature

This commit is contained in:
Lance Edgar 2019-10-31 13:28:00 -05:00
parent 847136b69c
commit ebc22d845a
2 changed files with 109 additions and 13 deletions

View file

@ -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