CNV-54239: selected VMs is not getting updates #2334
Merged
+56
−33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
When saving the whole VM object when checking a row, it doesn't get updated when the VM is updated, but we simply have a copy of the VM object when selected which is causing the bulk actions to be incorrect after selecting VMs and doing a bulk action on them.
The fix includes changing the logic to save the VM's name and namespace identifiers, observing a mapper of VMs that gets updated on changes and apply the right actions.
🎥 Demo
Before:
bulk-actions-dont-refresh-b4.mp4
After:
bulk-actions-dont-refresh-fixed.mp4