Skip to content

Commit

Permalink
[Search] Fix autogenerated connector names (#197585)
Browse files Browse the repository at this point in the history
Improve the autogenerated connector names by

- Re-generating names when changing connector source
- Preventing editing of names after connector is created
  • Loading branch information
navarone-feekery authored Oct 25, 2024
1 parent 12ad715 commit c05e1c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const StartStep: React.FC<StartStepProps> = ({
name="first"
value={rawName}
onChange={handleNameChange}
disabled={!!connector}
onBlur={() => {
if (selectedConnector) {
generateConnectorName({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ export const NewConnectorLogic = kea<MakeLogicType<NewConnectorValues, NewConnec
}
},
connectorNameGenerated: ({ connectorName }) => {
if (!values.rawName) {
actions.setRawName(connectorName);
}
actions.setRawName(connectorName);
},
createConnector: ({
isSelfManaged,
Expand Down Expand Up @@ -191,7 +189,6 @@ export const NewConnectorLogic = kea<MakeLogicType<NewConnectorValues, NewConnec
setSelectedConnector: ({ connector }) => {
if (connector) {
actions.generateConnectorName({
connectorName: values.rawName,
connectorType: connector.serviceType,
});
}
Expand Down

0 comments on commit c05e1c5

Please sign in to comment.