Closed swim89 closed 4 years ago
This is correct behavior, see this example.
If you set selectRow: false
, footer counter shows number of selected rows, and not number of rows with checked boxes.
Thank you for your answer! Is there any way to disable RowsCount if the checkbox is not checked?
Yes, you can use [select.info()
](https://datatables.net/reference/api/select.info()) Select extension API method to disable info about selected rows. See this example.
But it doesn't make sense to me why would you want to hide number of selected rows and keep the ability to select rows.
I want to select the rows by checking the checkbox not clicking on the row. This is my sense..
Best solution to prevent row selection by clicking on the row is to limit selection to the column containing checkboxes by using select.selector
option.
'select': {
'style': 'multi',
'selector': 'td:first-child'
},
See this example for code and demonstration.
You can combine it with using select.info()
API method to disable info about selected rows if you want.
If the value of
selectRow
is false and you click on the row (but don't check it) therowsCount
add/remove element on the footer.