mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
fix action dropdown gone on refresh
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import TextFieldSelect from './TextFieldSelect.svelte';
|
||||
import { BiMap } from '$lib/utils/maps';
|
||||
import { activeFormElement } from '$lib/store/activeFormElement';
|
||||
|
||||
export let onRefresh;
|
||||
export let isLoading = false;
|
||||
@@ -37,7 +38,8 @@
|
||||
stopAutoRefresh();
|
||||
if ($autoRefreshStore.enabled && $autoRefreshStore.interval > 0) {
|
||||
intervalId = setInterval(async () => {
|
||||
if (!$autoRefreshStore.enabled || isLoading) return;
|
||||
// skip refresh if disabled, loading, or a dropdown is open
|
||||
if (!$autoRefreshStore.enabled || isLoading || $activeFormElement !== null) return;
|
||||
await onRefresh();
|
||||
}, $autoRefreshStore.interval);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user