diff --git a/tailbone/templates/grids/buefy.mako b/tailbone/templates/grids/buefy.mako index 5bd0e619..00b9ce9e 100644 --- a/tailbone/templates/grids/buefy.mako +++ b/tailbone/templates/grids/buefy.mako @@ -143,6 +143,7 @@ :checkable="checkable" % if grid.checkboxes: :checked-rows.sync="checkedRows" + @click="rowClick" % endif % if grid.check_handler: @check="${grid.check_handler}" @@ -446,6 +447,20 @@ } return uuids }, + + // when a user clicks a row, handle as if they clicked checkbox. + // note that this method is only used if table is "checkable" + rowClick(row) { + let i = this.checkedRows.indexOf(row) + if (i >= 0) { + this.checkedRows.splice(i, 1) + } else { + this.checkedRows.push(row) + } + % if grid.check_handler: + this.${grid.check_handler}(this.checkedRows, row) + % endif + }, } } diff --git a/tailbone/templates/themes/falafel/base.mako b/tailbone/templates/themes/falafel/base.mako index 099fca16..28ff4f6e 100644 --- a/tailbone/templates/themes/falafel/base.mako +++ b/tailbone/templates/themes/falafel/base.mako @@ -114,9 +114,7 @@ <%def name="buefy()"> - ## Buefy (last known good @ 0.8.2) - ## ${h.javascript_link('https://unpkg.com/buefy/dist/buefy.min.js')} - ${h.javascript_link('https://unpkg.com/buefy@0.8.2/dist/buefy.min.js')} + ${h.javascript_link('https://unpkg.com/buefy@0.8.6/dist/buefy.min.js')} <%def name="fontawesome()">