Enhance alias filter handling and data loading in Svelte components
- 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:
@@ -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>
|
||||
|
||||
|
||||
@@ -135,7 +135,6 @@
|
||||
}
|
||||
|
||||
async function handleAliasFilterChange(nextAlias: string) {
|
||||
if (nextAlias === aliasFilter) return;
|
||||
aliasFilter = nextAlias;
|
||||
await applyAliasIfChanged(nextAlias);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user