From 6bbe39b913b91389ad90be8f3739b71f9e03b121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Volf?= <66163112+matous-volf@users.noreply.github.com> Date: Thu, 19 Sep 2024 20:05:53 +0200 Subject: [PATCH] fix: project selection getting reset in on category change in the task form --- src/components/task_form.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/task_form.rs b/src/components/task_form.rs index 1dd3696..909ef0f 100644 --- a/src/components/task_form.rs +++ b/src/components/task_form.rs @@ -15,7 +15,6 @@ use dioxus::prelude::*; use dioxus_query::prelude::use_query_client; use dioxus_sdk::i18n::use_i18; use dioxus_sdk::translate; -use voca_rs::Voca; const REMINDER_OFFSETS: [Option; 17] = [ None, @@ -182,7 +181,7 @@ pub(crate) fn TaskForm(task: Option, on_successful_submit: EventHandler<() for project in projects { option { value: project.id().to_string(), - selected: task.as_ref().is_some_and( + initial_selected: task.as_ref().is_some_and( |task| task.project_id() == Some(project.id()) ), {project.title()}