diff --git a/client/src/app/pages/applications/analysis-wizard/set-mode.tsx b/client/src/app/pages/applications/analysis-wizard/set-mode.tsx index 6a2ce9238c..ee2667486c 100644 --- a/client/src/app/pages/applications/analysis-wizard/set-mode.tsx +++ b/client/src/app/pages/applications/analysis-wizard/set-mode.tsx @@ -59,7 +59,7 @@ export const SetMode: React.FC = ({ isSingleApp, isModeValid }) => { label={t("wizard.label.analysisSource")} fieldId="analysis-mode" isRequired - renderInput={({ field: { value, name } }) => ( + renderInput={({ field: { value, name, onChange } }) => ( = ({ isSingleApp, isModeValid }) => { variant="single" value={toOptionLike(value, options)} onChange={(selection) => { - const option = selection as OptionWithValue; - setValue(name, option.value); + const selectionValue = selection as OptionWithValue; + onChange(selectionValue.value); }} options={options} /> diff --git a/client/src/app/pages/identities/components/identity-form/identity-form.tsx b/client/src/app/pages/identities/components/identity-form/identity-form.tsx index d99e167855..67b051b043 100644 --- a/client/src/app/pages/identities/components/identity-form/identity-form.tsx +++ b/client/src/app/pages/identities/components/identity-form/identity-form.tsx @@ -465,7 +465,7 @@ export const IdentityForm: React.FC = ({ label="Type" fieldId="type-select" isRequired - renderInput={({ field: { value, name } }) => ( + renderInput={({ field: { value, name, onChange } }) => ( = ({ options={kindOptions} onChange={(selection) => { const selectionValue = selection as OptionWithValue; - setValue(name, selectionValue.value); + onChange(selectionValue.value); // So we don't retain the values from the wrong type of credential resetField("user"); resetField("password"); @@ -492,7 +492,7 @@ export const IdentityForm: React.FC = ({ label="User credentials" isRequired fieldId="user-credentials-select" - renderInput={({ field: { value, name } }) => ( + renderInput={({ field: { value, name, onChange } }) => ( = ({ onChange={(selection) => { const selectionValue = selection as OptionWithValue; - setValue(name, selectionValue.value); + onChange(selectionValue.value); // So we don't retain the values from the wrong type of credential resetField("user"); resetField("password");