|| value.toString() ); const onViewMoreClick = (event: any) => { // Set the index for the next item to focus after view more clicked, then call view more callback setViewMoreNextIndex(); onClick(event); }; const renderOption = ( onSelect: ( event: React.MouseEvent | React.ChangeEvent, value: string | SelectOptionObject, isPlaceholder?: boolean ) => void, onClose: () => void, variant: string, inputIdPrefix: string, onFavorite: (itemId: string, isFavorite: boolean) => void, shouldResetOnSelect: boolean ) => { if (variant !== SelectVariant.checkbox && isLoading && isGrouped) { return (
{children}
); } else if (variant !== SelectVariant.checkbox && isLoad && isGrouped) { return (
); } else if (variant !== SelectVariant.checkbox) { return ( ); } else if (variant === SelectVariant.checkbox && isLoad) { return ( ); } else if (variant === SelectVariant.checkbox && isLoading) { return (
{children}
); } else if (variant === SelectVariant.checkbox && !isNoResultsOption && !isLoading && !isLoad) { return ( ); } else if (variant === SelectVariant.checkbox && isNoResultsOption && !isLoading && !isLoad) { return (
{ this.onKeyDown(event, 0, undefined, true); }} type="button" > {itemDisplay}
); } }; return ( {({ onSelect, onClose, variant, inputIdPrefix, onFavorite, shouldResetOnSelect }) => ( {renderOption(onSelect, onClose, variant, inputIdPrefix, onFavorite, shouldResetOnSelect)} )} ); } } export { SelectOption };