Prechádzať zdrojové kódy

fix(ui): icon picker for the dropdown property editor

charlie 1 rok pred
rodič
commit
616adaec8a

+ 1 - 4
src/main/frontend/components/icon.cljs

@@ -305,10 +305,7 @@
   (rum/local :all ::tab)
   (rum/local nil ::hover)
   {:init (fn [s]
-           (assoc s ::color (atom (storage/get :ls-icon-color-preset))))
-   :will-unmount (fn [state]
-                   (shui/popup-hide!)
-                   state)}
+           (assoc s ::color (atom (storage/get :ls-icon-color-preset))))}
   [state {:keys [on-chosen del-btn?] :as opts}]
   (let [*q (::q state)
         *result (::result state)

+ 3 - 1
src/main/frontend/components/property/value.cljs

@@ -66,7 +66,9 @@
                        (db-property-handler/remove-block-property!
                          (:db/id block)
                          :logseq.property/icon))
-                     (shui/popup-hide!)
+                     ;; close icon picker & select
+                     (shui/popup-hide-all!)
+                     ;; close page property select modal
                      (shui/dialog-close!))})]))
 
 (defn- select-type?