mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
fix(control): toggle select all
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user