mirror of https://github.com/sualko/cloud_bbb
parent
43aee27a47
commit
a81d97a6e5
|
@ -48,9 +48,13 @@ const ShareSelection: React.FC<Props> = (props) => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTimeout(() => setShowSearchResults(hasFocus), 100);
|
setShowSearchResults(hasFocus);
|
||||||
}, [hasFocus]);
|
}, [hasFocus]);
|
||||||
|
|
||||||
|
function preventOnBlurEvent(ev: React.MouseEvent) {
|
||||||
|
ev.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
async function selectShare(share: ShareWithOption) {
|
async function selectShare(share: ShareWithOption) {
|
||||||
props.selectShare(share);
|
props.selectShare(share);
|
||||||
|
|
||||||
|
@ -65,7 +69,12 @@ const ShareSelection: React.FC<Props> = (props) => {
|
||||||
] : [];
|
] : [];
|
||||||
|
|
||||||
const renderOption = (option: ShareWithOption) => {
|
const renderOption = (option: ShareWithOption) => {
|
||||||
return (<li key={option.value.shareWith} className="suggestion" onClick={() => selectShare(option)}>
|
return (
|
||||||
|
<li
|
||||||
|
key={option.value.shareWith}
|
||||||
|
className="suggestion"
|
||||||
|
onMouseDown={preventOnBlurEvent}
|
||||||
|
onClick={() => selectShare(option)}>
|
||||||
{option.label}{option.value.shareType === ShareType.Group ? ` (${t('bbb', 'Group')})` : ''}
|
{option.label}{option.value.shareType === ShareType.Group ? ` (${t('bbb', 'Group')})` : ''}
|
||||||
</li>);
|
</li>);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue