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,9 +69,14 @@ 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 (
|
||||||
{option.label}{option.value.shareType === ShareType.Group ? ` (${t('bbb', 'Group')})` : ''}
|
<li
|
||||||
</li>);
|
key={option.value.shareWith}
|
||||||
|
className="suggestion"
|
||||||
|
onMouseDown={preventOnBlurEvent}
|
||||||
|
onClick={() => selectShare(option)}>
|
||||||
|
{option.label}{option.value.shareType === ShareType.Group ? ` (${t('bbb', 'Group')})` : ''}
|
||||||
|
</li>);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue