Skip to content

Commit

Permalink
[Search] Don't skip ahead if connector doesn't have config items (ela…
Browse files Browse the repository at this point in the history
…stic#176725)

## Summary

This fixes an issue where connectors config would skip ahead on setting
a service type.
  • Loading branch information
sphilipse authored and CoenWarmer committed Feb 15, 2024
1 parent a139138 commit 4bd460e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ export const ConnectorConfiguration: React.FC<ConnectorConfigurationProps> = ({
const step =
connector.status === ConnectorStatus.CREATED
? 'link'
: connector.status === ConnectorStatus.NEEDS_CONFIGURATION
: connector.status === ConnectorStatus.NEEDS_CONFIGURATION &&
Object.keys(connector.configuration || {}).length > 0
? 'configure'
: connector.status === ConnectorStatus.CONFIGURED
? 'connect'
: 'connected';
setCurrentStep(step);
}, [connector.status, setCurrentStep]);
}, [connector.status, setCurrentStep, connector.configuration]);
const steps: EuiStepsHorizontalProps['steps'] = [
{
title: i18n.translate('xpack.serverlessSearch.connectors.config.linkToElasticTitle', {
Expand Down

0 comments on commit 4bd460e

Please sign in to comment.