Skip to content

[ENG-36476] fix: connectors not displaying data from API#3231

Open
gdsantana wants to merge 2 commits intodevfrom
ENG-36476-connectors-nao-exibindo-dados-que-vem-da-api
Open

[ENG-36476] fix: connectors not displaying data from API#3231
gdsantana wants to merge 2 commits intodevfrom
ENG-36476-connectors-nao-exibindo-dados-que-vem-da-api

Conversation

@gdsantana
Copy link
Contributor

Bug fix

What was the problem?

Edge Connectors was not displaying data that comes from the API correctly. Two main issues were identified:

  1. Load Balancer Configuration: When editing an existing connector, the watch on loadBalancerEnabled was resetting the configuration values (maxRetries, connectionTimeout, readWriteTimeout) to defaults, overwriting the values loaded from the API.

  2. Conditional rendering with v-if: Components using v-if were being destroyed and recreated, losing their form field bindings and values when toggling visibility.

Expected behavior

  • When editing an existing Edge Connector, the form should display the values loaded from the API
  • Load Balancer configuration should only set default values when creating a new connector, not when editing
  • Address and Load Balancer Configuration components should maintain their field values

How was it solved

  1. Load Balancer Configuration: Added a hasInitialConfig computed property that checks if configuration values already exist. The watch now only sets default values when loadBalancerEnabled becomes true AND there's no initial configuration (!hasInitialConfig.value).

  2. Replaced v-if with hidden class: Changed from v-if to :class="{ hidden: !condition }" for LoadBalancerConfiguration and Address components. This approach was chosen because:

    • v-show adds display: none inline style, which wasn't being applied with !important and could be overridden
    • The hidden CSS class provides a more reliable way to hide components while keeping them mounted and preserving their form field bindings

How to test

  1. Navigate to Edge Connectors
  2. Create a new HTTP connector with Load Balancer enabled
  3. Set custom values for Max Retries, Connection Timeout, and Read/Write Timeout
  4. Save the connector
  5. Edit the same connector
  6. Verify that all Load Balancer configuration values are correctly displayed (not reset to defaults)
  7. Toggle the connector type and verify Address fields maintain their values

@gdsantana gdsantana self-assigned this Feb 4, 2026
@gdsantana gdsantana added the bug Something isn't working label Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

1 participant