From 7ae3c5a8069e8b8c5fb8a896d71c0646cf95e6dd Mon Sep 17 00:00:00 2001 From: Denozordec Date: Fri, 10 Apr 2026 14:57:35 +0700 Subject: [PATCH] Enhance alias filter select component and integrate value change handling - Added an `onValueChange` callback to the alias filter select component for improved event handling. - Updated the component's logic to normalize the selected value and trigger the callback on changes. - Implemented the alias filter change handling in the IPs and users pages to apply changes effectively. --- web/src/lib/components/alias-filter-select.svelte | 14 ++++++++++++-- web/src/routes/ips/+page.svelte | 12 +++++++++++- web/src/routes/users/+page.svelte | 12 +++++++++++- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/web/src/lib/components/alias-filter-select.svelte b/web/src/lib/components/alias-filter-select.svelte index 9c9b43e..f0bb5b6 100644 --- a/web/src/lib/components/alias-filter-select.svelte +++ b/web/src/lib/components/alias-filter-select.svelte @@ -5,12 +5,14 @@ availableAliases = [], value = $bindable("all"), label = "Alias", - allLabel = "All nodes" + allLabel = "All nodes", + onValueChange }: { availableAliases: string[]; value?: string; label?: string; allLabel?: string; + onValueChange?: (next: string) => void; } = $props(); $effect(() => { @@ -25,7 +27,15 @@