From b1085eba757da801d9eea32f5f2dc632aa215b79 Mon Sep 17 00:00:00 2001 From: gsovereignty Date: Mon, 14 Oct 2024 19:34:41 +0800 Subject: [PATCH] problem: can't open and close list --- src/components/RecursiveProblemTile.svelte | 41 +++++++++++++--------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/src/components/RecursiveProblemTile.svelte b/src/components/RecursiveProblemTile.svelte index 3f48a95..a956894 100644 --- a/src/components/RecursiveProblemTile.svelte +++ b/src/components/RecursiveProblemTile.svelte @@ -1,8 +1,9 @@ {#if problem} - - {#if $selected == problem} +
+
{ + expanded = !expanded; + }} + > + {#if !expanded}{:else}{/if}{$children.length} sub-problems +
+
+ + {#if expanded} {#each $children as child}