When reaching the Select PVCs step, once the query resolves with PVCs for the first time they are all preselected in form state (because the main use case is assumed to be to migrating all PVCs in the namespace, and to be consistent with MTC). A ref is used to ensure this only happens once and does not override user selections, as the effect is triggered any time the query refetches.
Also, if there are PVCs in the list and none of them are selected, when clicking Next this warning appears:
This replicates the similar message that appears in the empty state if no PVCs are in the source namespace (no warning modal is shown if proceeding in this case since the warning is already on the screen):
Had this in my notes as a nice-to-have.
When reaching the Select PVCs step, once the query resolves with PVCs for the first time they are all preselected in form state (because the main use case is assumed to be to migrating all PVCs in the namespace, and to be consistent with MTC). A ref is used to ensure this only happens once and does not override user selections, as the effect is triggered any time the query refetches.
Also, if there are PVCs in the list and none of them are selected, when clicking Next this warning appears:
This replicates the similar message that appears in the empty state if no PVCs are in the source namespace (no warning modal is shown if proceeding in this case since the warning is already on the screen):