GigaTables/reactables

Selection inconsistent after clearing search condition

wangfrombupt opened this issue · 4 comments

Reproduce process:

  1. Input a search condition in the search box, so that GT displays only the satisfied records;
  2. select a record;
  3. clear the search condition in the search box so that GT displays all records;
  4. the record being selected will not be the originally selected one.

Ok, do u have some examples online of what functionality needed? As I see this problem, we can imagine search as a state ex.: when we input/delete anything in the search field - state changes, there are also issues with multiple rows selected, ex.:

  1. Input a search condition in the search box, so that GT displays only the satisfied records;
  2. select multiple records;
  3. And here when we clear the search condition where should those n rows be? Because they can be on different pages on 99, 123, 21 - how to display them?

Search fields was developed, with that in mind - to refresh the state of a table, if condition was erased.

I get your point and I'm with you that there's no way to show selections which distribute on different pages.
However, from the user perspective, the behavior of GT does bring some confusion and may lead to misoperations. Why not remove the selection when the search condition is erased? In that way, only the first page should be displayed and the user doesn't get the chance to operate on the record (e.g. delete it) he doesn't mean to select.

Got your point, u've meant that there is still selected row, but the other one - ok I'll fix this in near future.

Thx for titanic help, here is another patch - https://github.com/GigaTables/reactables/releases/tag/2.3.12