Skip to content

Commit

Permalink
add types
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <[email protected]>
  • Loading branch information
mengweieric committed Oct 14, 2024
1 parent c084206 commit d898b17
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const CollectAndShipData: React.FC<CollectAndShipDataProps> = ({
};
}, [specificMethod]);

const handleSpecificMethodChange = (newOption: any) => {
const handleSpecificMethodChange = (newOption: Array<EuiSelectableOption<CollectorOption>>) => {
const selectedOptionValue = newOption[0]?.value;

if (selectedOptionValue === specificMethod) {
Expand Down Expand Up @@ -206,7 +206,9 @@ export const CollectAndShipData: React.FC<CollectAndShipDataProps> = ({
singleSelection={{ asPlainText: true }}
options={optionsWithIcons}
selectedOptions={selectedOption ? [selectedOption] : []}
onChange={(newOptions) => handleSpecificMethodChange(newOptions)}
onChange={(newOptions) =>
handleSpecificMethodChange(newOptions as Array<EuiSelectableOption<CollectorOption>>)
}
renderOption={(option) => (
<div style={{ display: 'flex', alignItems: 'center' }}>
{option.prepend}
Expand Down

0 comments on commit d898b17

Please sign in to comment.