refac
This commit is contained in:
@@ -47,8 +47,8 @@
|
||||
|
||||
let page = 1;
|
||||
|
||||
// Debounce only query changes
|
||||
$: if (query !== undefined) {
|
||||
// Debounce only query changes (gate behind loaded to prevent double-fetch on mount)
|
||||
$: if (loaded && query !== undefined) {
|
||||
loading = true;
|
||||
clearTimeout(searchDebounceTimer);
|
||||
searchDebounceTimer = setTimeout(() => {
|
||||
@@ -57,8 +57,8 @@
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// Immediate response to page/filter changes
|
||||
$: if (page && statusFilter !== undefined) {
|
||||
// Immediate response to page/filter changes (gate behind loaded)
|
||||
$: if (loaded && page && statusFilter !== undefined) {
|
||||
getAutomationList();
|
||||
}
|
||||
|
||||
@@ -171,6 +171,8 @@
|
||||
}
|
||||
|
||||
loaded = true;
|
||||
// Explicit initial fetch — reactive blocks will handle subsequent changes
|
||||
await getAutomationList();
|
||||
|
||||
return () => {
|
||||
clearTimeout(searchDebounceTimer);
|
||||
|
||||
Reference in New Issue
Block a user