Content Hosts > Subscriptions: Switching between "List/Remove" and "Add" doesn't toggle right/leads to off-by-one
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1207488
Description of problem:
Within the content host UI, when user selects an item in "Add", switches between the two tabs and returns, the expected button is no longer enabled, and unchecking/checking leads to the UI reading "-1"/"0" instead of "0"/"1"
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Add a bunch of different content to an AC; register a system using AC
2. Hosts > Content Host > $hostname > Subscriptions
3. Noting "List/Remove" is the default tab, choose the "Add" tab.
4. Click an available item in "Add", but DO NOT click 'Add Selected'. Instead, nav back to the "List/Remove" tab.
5. Noting the "Remove Selected" button is (correctly) grayed out, immediately switch back to the "Add" Tab.
6. Note the state of the "Add Selected" button; select/deselect any item on list
- Button is incorrectly grayed out upon return to tab
- "x Selected" next to the "Add Selected button is incorrect.
- toggling selector can mean the "x Selected" reads -1 instead of 0 and 0 instead of 1, respectively.
Keep track of tabs and items selected, appropriately
I haven't looked to see if this actually affects usability yet - maybe not. But it is not very pretty.
fixes #10537 - Fixes toggle issue when switching between subscription panes on content host, BZ1207488