how to disable the default "on row click" to select a row. wish to use only the checkbox.

Greetings!
The following snippet allows to select / unselect a row when the associated checkbox is clicked. Apart from that, if a row is clicked elsewhere (not just on the checkbox), select / unselect is performed. How to disable this default behavior?

https://webix.com/snippet/e61936d3

Comments

  • edited May 2017
    on: {
       "onCheck": (r,c,s)=>s?$$("dt").select(r, 1/*important*/):$$("dt").unselect(r),
       onBeforeSelect: function(obj, preserve) {
          return preserve === 1;
       },
       onBeforeUnselect(obj) {
           return !obj.column;
       }
    }
    
  • The solution does not work becasue when onBeforeSelect is working as declared, datatable.select() is not selecting.

    Another solution to this? I also want to use checkbox to select and invalidate the natural row selection.

  • @gratistotal
    probably you have set select:false in table config
    try to set select:true
    https://snippet.webix.com/58omi2z5

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!