select style 'api' not working

select style 'api' not working

Francesco Di SciascioFrancesco Di Sciascio Posts: 8Questions: 3Answers: 0
edited February 2022 in Select

Hi everyone,
I'm facing a trouble with DataTables select plugin; in particular, it seems that the 'api' style selection already allows user to select rows of table, but I expected that it doesn't, as read in api reference here.
I would set the style in the initComplete() callback, but it doesn't work too: rows are always selectable

Here's the code of table initialization:

prestDaSelezionareTable = $('#prestDaSelezionareTable').DataTable({
                    ajax: {
                        url: url,
                        dataSrc: ""
                    columns: [
                        {"data": "codice"},
                        {"data": "prestazione"},
                        {"data": "statoPrestazione"},
                        {"data": "giorno"},
                        {"data": "sconto"}
                    columnDefs: [
                            targets: 'thHidden',
                            visible: false
                            targets: COLONNA_GIORNO,
                            render: $.fn.dataTable.render.moment('MMM D, YYYY HH:mm:ss A', 'DD/MM/YYYY')
                    language: {
                        "url": "//"
                    select: {
                        style: 'api',
                        info: false

Thanks for the suggestions.

This question has an accepted answers - jump to answer


Sign In or Register to comment.