fix(control): toggle select all

This commit is contained in:
2026-01-05 23:14:25 +01:00
parent ef64330050
commit c4d7f8e0e4
3 changed files with 9 additions and 21 deletions
@@ -12,7 +12,7 @@
import {
all_displays_of_group_selected,
get_display_ids_in_group,
select_all_of_group,
set_select_for_group,
set_new_display_order
} from '$lib/ts/stores/displays';
import DNDGrip from '$lib/components/DNDGrip.svelte';
@@ -41,7 +41,7 @@
async function select_all_of_this_group() {
const new_value = !($all_selected || false);
await select_all_of_group(display_group_id, new_value);
await set_select_for_group(display_group_id, new_value);
}
async function handle_consider(e: CustomEvent) {
@@ -82,10 +82,7 @@ export async function all_displays_of_group_selected(
return true;
}
export async function select_all_of_group(
display_group_id: string,
new_value: boolean | null = null
) {
export async function set_select_for_group(display_group_id: string, new_value: boolean) {
const displays_of_group: Display[] = await db.displays
.where('group_id')
.equals(display_group_id)