Skip to content

Commit

Permalink
removed unneeded selectedVersionStr as it uses selectedVersion now
Browse files Browse the repository at this point in the history
  • Loading branch information
Supplementing committed Dec 19, 2024
1 parent 6f84a3e commit 67666da
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ export const AgentUpgradeAgentModal: React.FunctionComponent<AgentUpgradeAgentMo
},
];
const [selectedVersion, setSelectedVersion] = useState(preselected);
const [selectedVersionStr, setSelectedVersionStr] = useState('');

// latest agent version might be earlier than kibana version
const latestAgentVersion = useAgentVersion();
Expand Down Expand Up @@ -571,7 +570,7 @@ export const AgentUpgradeAgentModal: React.FunctionComponent<AgentUpgradeAgentMo
data-test-subj="agentUpgradeModal.VersionInput"
onChange={(e) => {
const newValue = e.target.value;
setSelectedVersionStr(newValue);

setSelectedVersion([{ label: newValue, value: newValue }]);
}}
isInvalid={!!semverErrors}
Expand Down

0 comments on commit 67666da

Please sign in to comment.