Merge pull request #17640 from ShirasawaSama/patch-27
feat: do not initiate requests when the SearchModal is not open to speed up page loading
This commit is contained in:
commit
651dea3864
|
@ -149,9 +149,9 @@
|
|||
chatListLoading = false;
|
||||
};
|
||||
|
||||
const init = () => {
|
||||
$: if (show) {
|
||||
searchHandler();
|
||||
};
|
||||
}
|
||||
|
||||
const onKeyDown = (e) => {
|
||||
const searchOptions = document.getElementById('search-options-container');
|
||||
|
@ -205,8 +205,6 @@
|
|||
};
|
||||
|
||||
onMount(() => {
|
||||
init();
|
||||
|
||||
document.addEventListener('keydown', onKeyDown);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue