Skip to content

UI Component grid indicates a wrong number of selections when removing keyword search #24348

Closed
@hostep

Description

@hostep

Preconditions (*)

  1. Seen on Magento 2.2.3, 2.3.2 and 2.3, 2.4-develop (7cf99d1), so probably all M2 versions are affected

Steps to reproduce (*)

  1. Setup some vanilla Magento

  2. Login to the backend

  3. Create 3 customers: 'One One', 'Two Two' and 'Three Three':
    <img width="486" alt="Screenshot 2019-08-28 at 20 05 17" src="https://user-images.githubusercontent.com/85479/63881267-b98dc500-c9cf-11e9-8669-8dc78cfb98c7.png"]

  4. In the 'Search by keyword' box, enter 'one' and search

  5. In the first column, choose the 'Select All' option

  6. Notice that one record is selected:
    [img width="421" alt="Screenshot 2019-08-28 at 20 06 11" src="https://user-images.githubusercontent.com/85479/63881435-21441000-c9d0-11e9-949c-d2a56c865649.png"]

  7. Remove the 'one' keyword search by pressing the 'x' icon to the right of it.

  8. Notice that it now says that one record is selected, but visually all records have a checkmark:
    [img width="424" alt="Screenshot 2019-08-28 at 20 06 24" src="https://user-images.githubusercontent.com/85479/63881521-518bae80-c9d0-11e9-819d-794096cd597a.png"]

=> this is probably the main bug, but it gets even worse

  1. Select Actions => Delete

  2. Notice that it says it will remove 1 record:
    [img width="692" alt="Screenshot 2019-08-28 at 20 06 36" src="https://user-images.githubusercontent.com/85479/63881616-87309780-c9d0-11e9-8a77-b37ebaea6768.png"]

  3. Press OK

  4. Notice that it now removed all records (3) instead of the 1 it claimed to delete before yikes!
    [img width="441" alt="Screenshot 2019-08-28 at 20 06 47" src="https://user-images.githubusercontent.com/85479/63881704-b6df9f80-c9d0-11e9-99d9-690560719c9e.png">

Note that the exact same thing can be reproduced with the product grid (and maybe other grids as well in Magento).

Expected result (*)

  1. After removing the keyword search, it should only keep 1 record selected, not all of them

Actual result (*)

  1. Shop owners calling in panic that they unintentionally removed all their customers/products somehow

Metadata

Metadata

Assignees

Labels

Component: BackendComponent: UiFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.Triage: DoneHas been reviewed and prioritized during Triage with Product Managers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions