Enhance alias filter handling and data loading in Svelte components
Publish telemt-api gateway Docker image / test (push) Successful in 25s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 2m26s

- Updated the alias filter select component to include an `onValueChange` handler for improved value management.
- Implemented immediate data reload upon filter change to ensure the displayed information is current.
- Removed redundant alias filter check in the users page to streamline the alias change process.
This commit is contained in:
Denozordec
2026-04-10 15:29:35 +07:00
parent 8b996c6e25
commit 68b74a861d
2 changed files with 10 additions and 2 deletions
+10 -1
View File
@@ -226,6 +226,8 @@
noScroll: true,
keepFocus: true
});
// Для стабильности сразу перезагружаем данные по новому фильтру.
await load();
}
let queryKey = $derived(page.url.searchParams.toString());
@@ -521,7 +523,14 @@
</div>
<div class="mb-4 flex flex-wrap items-end gap-2">
<AliasFilterSelect availableAliases={availableAliases} bind:value={aliasFilter} />
<AliasFilterSelect
availableAliases={availableAliases}
bind:value={aliasFilter}
onValueChange={(next) => {
aliasFilter = next;
void applyAliasIfChanged(next);
}}
/>
<FleetRefreshInput bind:value={refreshInput} onValueChange={() => void applyControls()} />
</div>
-1
View File
@@ -135,7 +135,6 @@
}
async function handleAliasFilterChange(nextAlias: string) {
if (nextAlias === aliasFilter) return;
aliasFilter = nextAlias;
await applyAliasIfChanged(nextAlias);
}