Bootstrap-table: Incorrect row unchecked on unchecking after applying search filter.

Created on 26 Oct 2020  路  2Comments  路  Source: wenzhixin/bootstrap-table

Bootstraptable version(s) affected: v1.18.0

Description
Steps to reproduce:

  1. Select all rows using checkbox.
  2. Search for some keyword.
  3. Uncheck a row from the search results.
  4. Clear search box.
  5. The table unchecks using index, not value. So, if first row was unchecked from search results, then first row is also unchecked from selections made in Step 1.

Example
https://live.bootstrap-table.com/code/supmanyu/5191

Bug confirmed has PR

Most helpful comment

Having a related issue:
selecting a row after doing a search, then deleting the search, results in the wrong row selected.
The rows get selected based on their index at time of selection (which changes when doing a search, sorting or filtering in any other way).

Also #5420 and #5384 seem related.

That feels like a major bug. Will follow this conversation about a solution. I personally like #5414 approach of having a UID for each row.

All 2 comments

Fixed label has been added, but the PR hasnt been merged yet.

Having a related issue:
selecting a row after doing a search, then deleting the search, results in the wrong row selected.
The rows get selected based on their index at time of selection (which changes when doing a search, sorting or filtering in any other way).

Also #5420 and #5384 seem related.

That feels like a major bug. Will follow this conversation about a solution. I personally like #5414 approach of having a UID for each row.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mnswiftone picture mnswiftone  路  4Comments

iamthestreets picture iamthestreets  路  5Comments

sbellani picture sbellani  路  4Comments

lmarqs picture lmarqs  路  3Comments

peter064226 picture peter064226  路  3Comments