Skip to content

DiscoverySourceSetupModal: Clear static-IP validation errors when switching to DHCP #358

@coderabbitai

Description

@coderabbitai

Description

When a user configures static IP settings in the DiscoverySourceSetupModal and triggers validation errors, then switches back to DHCP mode, the validation error flags remain set. This keeps the submit button disabled even though the static IP fields are hidden in DHCP mode.

Steps to Reproduce

  1. Open the Add Environment modal
  2. Select "Static IP configuration"
  3. Leave static IP fields empty or enter invalid values to trigger validation errors
  4. Switch back to "DHCP" mode
  5. Observe that the submit button remains disabled

Expected Behavior

When switching from static IP to DHCP mode, the form should clear any static-IP related validation errors and field values, allowing the user to submit the form.

Location

  • File: src/pages/environment/sources-table/empty-state/DiscoverySourceSetupModal.tsx
  • Lines: around 695-710

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions