Select, Info settings and jquery-datatables-checkboxes

Select, Info settings and jquery-datatables-checkboxes

lenamtllenamtl Posts: 265Questions: 65Answers: 1

Hi,

I'm using Datatables Select with jquery-datatables-checkboxes

I edited datatables select plugin so info default value is false
(because I don't us it much and I have a tons of tables)
var info = false;
This working fine the info does not appear on my tables
except it appear on the table where I use the Select & jquery-datatables-checkboxes plugin
which is fine but I did not enable it yet ?

"select": {
    'style': 'multi',
    'selector': 'td:nth-child(2),td:nth-child(10)',
    //'info': true,
},

So is this mean that jquery-datatables-checkboxes enable to display info by default and bypassed the Datatables settings?
Or there is the Datatables Select plugin behavior
I just want to understand how it suppose to work

Thanks

Answers

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    edited January 2020

    I just tried it and what you said is what I see. Setting var info = false; in the select.js does turn of the info display. However when using the jquery-datatables-checkboxes plugin it seems to update the info. I suspect it is looking the the Datatables info setting. To find out more info about what the plugin is doing you will need to contact the developer:
    https://www.gyrocode.com/projects/jquery-datatables-checkboxes/

    The downside of changing the select.js is that you or someone else will need to remember to change that line of code after upgrading. My suggestion is to look at using this technique to set Datatables defaults and not edit the select.js. This will also resolve the checkboxes plugin issue.

    Kevin

  • lenamtllenamtl Posts: 265Questions: 65Answers: 1
    edited January 2020

    Hi,

    I agree about the update change and I usually use the
    $.extend( $.fn.dataTable.defaults) method

    I saw some references about info into the jquery-datatables-checkboxes

    I will see with the dev and get back if there is a solution.
    For now I don't mind as it display and I need to display it but I would like to know how to hide in case I need to hide it later ...

  • lenamtllenamtl Posts: 265Questions: 65Answers: 1
    edited January 2020

    Hi,

    I have put back var info = true; in Datatables select JS file.
    I now use this as default seettings
    $.extend( $.fn.dataTable.defaults, {
    "select": {
    "info": false,
    },
    });

    but still jquery-datatables-checkboxes bypass this and display the info.

    **Note there are issue with the forum text editor (code does not work and text box get duplicated on saved..

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    Note there are issue with the forum text editor (code does not work and text box get duplicated on saved..

    The forum uses Markdown. Use triple back ticks (```) on new lines before and after the code block.

    but still jquery-datatables-checkboxes bypass this and display the info.

    Sorry to hear that. Hope Gyrocode is able to change this behavior.

    Kevin

  • lenamtllenamtl Posts: 265Questions: 65Answers: 1

    Hi kthorngren,

    This is a bug and author is aware of it, but no fix avaialable for now.
    I put the link so if other user encounter the same issue :
    https://github.com/gyrocode/jquery-datatables-checkboxes/issues/110

  • lenamtllenamtl Posts: 265Questions: 65Answers: 1

    The bug is fixed now

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    Cool, thanks for the update!

    Kevin

This discussion has been closed.