From b66032f2cc2a5d0b1303000bffeb7a088d283f3e Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 22 Jan 2024 11:06:32 +0100 Subject: [PATCH] :bug: Fix create assets group modal --- .../ui/workspace/sidebar/assets/groups.cljs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/groups.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/groups.cljs index bbc02f72a..2431c88b7 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/groups.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/groups.cljs @@ -101,15 +101,15 @@ ::mf/register-as :name-group-dialog} [{:keys [path last-path accept] :as ctx :or {path "" last-path ""}}] - (let [initial (mf/use-memo - (mf/deps last-path) - (constantly {:asset-name last-path})) - form (fm/use-form :spec ::name-group-form - :validators [(fm/validate-not-empty :name (tr "auth.name.not-all-space")) - (fm/validate-length :name fm/max-length-allowed (tr "auth.name.too-long"))] - :initial initial) + (let [initial (mf/use-memo + (mf/deps last-path) + (constantly {:asset-name last-path})) + form (fm/use-form :spec ::name-group-form + :validators [(fm/validate-not-empty :asset-name (tr "auth.name.not-all-space")) + (fm/validate-length :asset-name fm/max-length-allowed (tr "auth.name.too-long"))] + :initial initial) - create? (empty? path) + create? (empty? path) on-close (mf/use-fn #(modal/hide!)) @@ -122,6 +122,7 @@ (accept asset-name) (accept path asset-name)) (modal/hide!))))] + [:div {:class (stl/css :modal-overlay)} [:div {:class (stl/css :modal-container)} [:div {:class (stl/css :modal-header)}