gyrocode / jquery-datatables-checkboxes

Checkboxes is an extension for the jQuery DataTables library that provides universal solution for working with checkboxes in a table.
https://www.gyrocode.com/projects/jquery-datatables-checkboxes/
MIT License
150 stars 61 forks source link

Rows Selected not clear when api.ajax.reload() #130

Closed SherwinVN closed 3 years ago

SherwinVN commented 3 years ago

when i use api.column(1).checkboxes.selected() get row selected, but it not refresh select when api.ajax.reload()

  1. checked row one => 1 checked
  2. checked row two=> 2 checked
  3. api.ajax.reload()
  4. checked row one => 3 checked

plz help me?

mpryvkin commented 3 years ago

Unfortunately this is limitation of the plugin at the moment.

As a workaround please deselect all checkboxes before reloading the table.

For example:

api.column(0).checkboxes.deselectAll();
api.ajax.reload();
SherwinVN commented 3 years ago

Thank you so much!

SherwinVN commented 3 years ago

OMG! api.column(...).checkboxes.deselectAll is not a function => Checkboxes 1.1.0 update: use api.column(...).checkboxes.deselect(); Thanks you so much again.