Add pre-selection of calendars #20

Merged
tomate merged 4 commits from refs/pull/20/head into master 2022-03-29 20:33:07 +02:00
2 changed files with 13 additions and 6 deletions
Showing only changes of commit 20a5604bf9 - Show all commits

View file

@ -41,7 +41,7 @@
item={toplevel}
children={subtrees}
bind:selected={subSelections[i]}
bind:generalToggle
generalToggle={$generalToggle}
{initial}
/>
{/each}

View file

@ -77,11 +77,18 @@
dispatch('change', { value: evt.detail.value });
}
if (generalToggle) {
generalToggle.subscribe(value => {
value ? filtering.setChecked() : filtering.setUnchecked();
dispatch('change', { value: $filtering });
});
function handleGeneralToggleChange(value) {
if (value) {
filtering.setChecked();
} else {
filtering.setUnchecked();
}
dispatch('change', { value: $filtering });
}
$: if (generalToggle != null) {
handleGeneralToggleChange(generalToggle);
}
const url = (() => {