Incorrect checkbox behavior in Trash (Bin) when toggling sub-items

WHAT IS THE BUG

Detail what the bug does or prevents from doing:

  • State Mismatch: When unchecking a sub-item’s checkbox after expanding a selected parent item, the UI shows the checkbox as unchecked, but the internal selection state remains active.
  • Selection Menu Persistence: Even though the items appear unchecked, the action menu (selection bar) that appears during selection does not disappear and still functions as if the items are selected.

HOW TO REPRODUCE IT

Outline the steps needed to reproduce the behavior in sequence:

  1. Add a document to the Trash (Bin).

  2. Select the checkbox of the document.

  3. Click the > button to expand the sub-items.

  4. Uncheck the checkbox of a sub-item.

  5. Observe that while the checkboxes (including the parent’s) appear unchecked, the selection menu remains visible.

  6. Click any action in the menu; it functions as if the items are still selected, despite the checkboxes being cleared.