Refactor alias filter select component to prevent automatic reset of selected alias
Publish telemt-api gateway Docker image / test (push) Successful in 29s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 2m31s

- Updated logic in the alias filter select component to avoid resetting the selected alias to "all" during loading when the available aliases may be temporarily empty.
- Ensured that the selected value defaults to "all" only if no value is provided.
This commit is contained in:
Denozordec
2026-03-31 21:33:34 +07:00
parent 81331dd406
commit dade8253c4
@@ -14,12 +14,10 @@
} = $props();
$effect(() => {
if ((value ?? "all") !== "all" && !availableAliases.includes(value ?? "all")) {
value = "all";
}
if (!value) {
value = "all";
}
// Не сбрасываем выбранный alias автоматически:
// во время загрузки список может быть временно пустым, что
// приводило к возврату на "all" сразу после выбора.
if (!value) value = "all";
});
let selectedLabel = $derived((value ?? "all") === "all" ? allLabel : (value ?? "all"));