Skip to content

Update number of selected rows after rows().remove() #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Thibault34 opened this issue Feb 17, 2017 · 2 comments
Open

Update number of selected rows after rows().remove() #26

Thibault34 opened this issue Feb 17, 2017 · 2 comments

Comments

@Thibault34
Copy link

Hello,
When I use table.rows('.myClass').remove(), the number of select row is not updated.

I must be used :
table.rows('.myClass').deselect().remove().draw();

The problem isn't in default datatable checkbox selection :
http://live.datatables.net/seqejati/4/edit

Can you help me please ?

@mpryvkin
Copy link
Member

Good catch! However the example you mentioned uses different way to show checkboxes.

For now you need deselect() as shown below. See this example for code and demonstration.

table.rows('.myClass').deselect().remove().draw();

I will see if I could find a way to catch row removal event and update internal data accordingly.

@mpryvkin mpryvkin changed the title Update nb selected row whene rows(selector).remove() Update number of selected rows after rows().remove() Feb 23, 2017
@Thibault34
Copy link
Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants