Page 1 of 1

[VUE] selection Mode and showCheckAll doesn't work

Posted: Fri Jan 15, 2021 11:39 am
by c.amine

I'm trying to use the column with check type but the showCheckAll option doesn't work (the checkbox in header doesn't appear) i tried tu work with selectionMode but it doesn't work either

i believe that there is something missing in the project
any idea about what can be the problem ?
or if there is a way to add checkboxes with rendering option and bind them with events using jquery (without losing the evens on scrolling )


Re: [VUE] selection Mode and showCheckAll doesn't work

Posted: Fri Jan 15, 2021 12:16 pm
by mats

How does your Scheduler config look? Please post it here.


Re: [VUE] selection Mode and showCheckAll doesn't work

Posted: Fri Jan 15, 2021 1:26 pm
by c.amine
SchedulerConfig.js
(11.23 KiB) Downloaded 94 times

here is my shecduler config file


Re: [VUE] selection Mode and showCheckAll doesn't work

Posted: Fri Jan 15, 2021 1:58 pm
by pmiklashevich

You attachment is not runnable, but the config is clear. There is a known problem with CheckColumn, ticket here: https://github.com/bryntum/support/issues/2153

But the selection mode should work. There are 2 things though: do not specify cell and row selection together and there is no 'checkAll' event. Use selectionChange event instead.

    selectionMode : {
        rowCheckboxSelection : true,
        row                  : true,
        checkbox             : true,
        showCheckAll         : true
    },

listeners : {
    selectionChange({ mode, selection }) {
        console.log('Selection: ' + mode, selection);
    }
},

You can try this code in our demo: Scheduler/examples/vue/javascript/simple/src/components/schedulerConfig.js

Also need to pass the configs to the wrapper in Scheduler/examples/vue/javascript/simple/src/App.vue

        <scheduler
            ref                = "scheduler"
            :selectionMode     = "schedulerConfig.selectionMode"
            :listeners         = "schedulerConfig.listeners"
        ></scheduler>

Best,
Pavel


Re: [VUE] selection Mode and showCheckAll doesn't work

Posted: Mon Jan 18, 2021 1:25 pm
by c.amine

After doing this i got this error :

TypeError: Cannot read property 'indexOf' of undefined
at t.get (Column.js:805)
at Footer.js:92
at Array.map (<anonymous>)
at t.value (Footer.js:92)
at t.value (Footer.js:38)
at t.value (Footer.js:45)
at t.value (SubGrid.js:230)
at t.value (SubGrid.js:209)
at t.value (Base.js:212)
at t.value (Events.js:689)

it's like it doesn't recognize the index of the column !!


Re: [VUE] selection Mode and showCheckAll doesn't work

Posted: Mon Jan 18, 2021 5:49 pm
by pmiklashevich

How can I reproduce this? Have you tried this code with the demo I mentioned (vue/javascript/simple)? Does it work for you? Before give the solution to you I checked it with the demo and it worked good for me. Please produce a runnable testcase showing your issue