diff --git a/ui/src/reusable_ui/components/wizard/WizardTextInput.tsx b/ui/src/reusable_ui/components/wizard/WizardTextInput.tsx index 8f6e2a278..240c7585a 100644 --- a/ui/src/reusable_ui/components/wizard/WizardTextInput.tsx +++ b/ui/src/reusable_ui/components/wizard/WizardTextInput.tsx @@ -13,7 +13,7 @@ interface Props { isDisabled?: boolean onChange: (value: string) => void valueModifier?: (value: string) => string - submitAction?: (value: string) => void + onSubmit?: (value: string) => void placeholder?: string autoFocus?: boolean type?: string @@ -35,7 +35,7 @@ class WizardTextInput extends PureComponent { valueModifier: x => x, autoFocus: false, type: 'text', - submitAction: x => null, + onSubmit: () => null, } constructor(props) { @@ -55,7 +55,6 @@ class WizardTextInput extends PureComponent { autoFocus, label, type, - submitAction, } = this.props let inputClass = '' @@ -108,9 +107,9 @@ class WizardTextInput extends PureComponent { } private submit = incomingValue => { - const {onChange, value, valueModifier, submitAction} = this.props + const {onChange, value, valueModifier, onSubmit} = this.props const newValue = valueModifier(incomingValue) - submitAction(newValue) + onSubmit(newValue) if (value !== newValue) { onChange(newValue) diff --git a/ui/src/sources/components/SourceStep.tsx b/ui/src/sources/components/SourceStep.tsx index ac1d9b154..92c85df59 100644 --- a/ui/src/sources/components/SourceStep.tsx +++ b/ui/src/sources/components/SourceStep.tsx @@ -107,7 +107,7 @@ class SourceStep extends PureComponent { label="Connection URL" onChange={this.onChangeInput('url')} valueModifier={this.URLModifier} - submitAction={this.syncHostnames} + onSubmit={this.syncHostnames} />