Vuesax: multiple vs-table

Created on 4 Jan 2020  路  11Comments  路  Source: lusaxweb/vuesax

Hello,

The "check all" function does not work in this demo.

https://lusaxweb.github.io/vuesax/components/table.html#multiple-selected

Regards

Most helpful comment

I have the same problem :+1:

All 11 comments

Fix it team?

I have the same problem :+1:

my solution render function editing.

copy and import components inside the repository in the project
https://github.com/mehniyarif/Vs-table-select-all-solution

In my opinion, the main problem is a vs-checkbox component. It doesn't emit click event. It emits only two types of events such as 'input' and 'change'. In the vsTable.vue we can see @click="changeCheckedMultiple" in vs-checkbox, at the same time in VSTr.vue we can see @change="handleCheckbox". That's why it's work in TR and doesn't work in vsTable.vue.

The solution is to change @click="changeCheckedMultiple" to @change="changeCheckedMultiple" in vsTable.vue

I have created PR #854

Hum, or add click emit to vs checkbox for more compliant

Just extend VsCheckBox to fix :

const BaseVsCheckbox = Vue.options.components.VsCheckbox
const VsCheckbox = BaseVsCheckbox.extend({
  computed: {
    listeners () {
      return {
        ...this.$listeners
      }
    }
  }
})

Vue.component('VsCheckbox', VsCheckbox)

Thank you @cedvan, your solution worked...

@cedvan first,thank you,but I find your solution cause another bug.if you use tag in your webpage,you will find it cannot be turned down by user click

update vuesax version can fix this issue

my solution render function editing.

copy and import components inside the repository in the project
https://github.com/mehniyarif/Vs-table-select-all-solution

this link is not found

Was this page helpful?
0 / 5 - 0 ratings