Browse Source

fix: modal closed automatically

Tienson Qin 4 years ago
parent
commit
400434f5d7
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/main/frontend/components/command_palette.cljs

+ 2 - 4
src/main/frontend/components/command_palette.cljs

@@ -62,10 +62,8 @@
 (rum/defc command-palette-modal < rum/reactive
   []
   (let [open? (state/sub :ui/command-palette-open?)]
-    (if open?
+    (when open?
       (state/set-modal!
        #(command-palette {:commands (cp/get-commands)})
        {:fullscreen? false
-        :close-btn?  false})
-      (state/close-modal!))
-    nil))
+        :close-btn?  false}))))