From 1c666dc26a19f65381bc4e86615619ea7f8a7993 Mon Sep 17 00:00:00 2001 From: eraden Date: Wed, 20 Jan 2021 00:18:34 +0100 Subject: [PATCH] Fix add issue page --- jirs-client/src/shared/navbar_left.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jirs-client/src/shared/navbar_left.rs b/jirs-client/src/shared/navbar_left.rs index 2b51f01c..06c91b8b 100644 --- a/jirs-client/src/shared/navbar_left.rs +++ b/jirs-client/src/shared/navbar_left.rs @@ -78,7 +78,16 @@ pub fn render(model: &Model) -> Vec> { } else { vec![ navbar_left_item("Search issues", Icon::Search, None, None), - navbar_left_item("Create Issue", Icon::Plus, Some("/add-issue"), None), + navbar_left_item( + "Create Issue", + Icon::Plus, + Some("/add-issue"), + Some(mouse_ev("click", |ev| { + ev.stop_propagation(); + ev.prevent_default(); + Msg::ChangePage(Page::AddIssue) + })), + ), ] }; let go_to_profile = mouse_ev("click", move |ev| {