From a81d97a6e5394825fbc286052abd84dda7f261ef Mon Sep 17 00:00:00 2001 From: sualko Date: Thu, 24 Sep 2020 09:53:47 +0200 Subject: [PATCH] fix: drop down not clickable fix #73 --- ts/Common/ShareSelection.tsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ts/Common/ShareSelection.tsx b/ts/Common/ShareSelection.tsx index 73ed371..9c1bc92 100644 --- a/ts/Common/ShareSelection.tsx +++ b/ts/Common/ShareSelection.tsx @@ -48,9 +48,13 @@ const ShareSelection: React.FC = (props) => { }, []); useEffect(() => { - setTimeout(() => setShowSearchResults(hasFocus), 100); + setShowSearchResults(hasFocus); }, [hasFocus]); + function preventOnBlurEvent(ev: React.MouseEvent) { + ev.preventDefault(); + } + async function selectShare(share: ShareWithOption) { props.selectShare(share); @@ -65,9 +69,14 @@ const ShareSelection: React.FC = (props) => { ] : []; const renderOption = (option: ShareWithOption) => { - return (
  • selectShare(option)}> - {option.label}{option.value.shareType === ShareType.Group ? ` (${t('bbb', 'Group')})` : ''} -
  • ); + return ( +
  • selectShare(option)}> + {option.label}{option.value.shareType === ShareType.Group ? ` (${t('bbb', 'Group')})` : ''} +
  • ); }; return (