migtools / crane-ui-plugin

OpenShift Dynamic Plugin for Crane UI
1 stars 11 forks source link

Fix regression in wizard form state, simplify validation on first wizard step #116

Closed mturley closed 2 years ago

mturley commented 2 years ago

Fixes #104.

When any of the 3 fields on the first wizard step change (API URL, token, source namespace) any form selections that are based on data loaded from the source cluster are now automatically reset.

While fixing this I also noticed that the usage of areSourceCredentialsValid in that wizard step is redundant since we already call that within the schema validation of these fields in ImportWizardFormContext, so we can simply use the isValid properties of the fields instead.

ibolton336 commented 2 years ago

Tested and LGTM

openshift-ci[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ibolton336, mturley

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/konveyor/crane-ui-plugin/blob/main/OWNERS)~~ [ibolton336,mturley] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment