diff --git a/frontend/src/app/main/ui/workspace/colorpicker.cljs b/frontend/src/app/main/ui/workspace/colorpicker.cljs index abcdae7a8..c0ff40544 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker.cljs @@ -167,11 +167,12 @@ on-select-library-color (fn [color] - (reset! dirty? true) - (reset! state (data->state color))) + (reset! state (data->state color)) + (on-change color)) on-add-library-color - (fn [color] (st/emit! (dwl/add-color (state->data @state)))) + (fn [color] + (st/emit! (dwl/add-color (state->data @state)))) on-activate-gradient (fn [type] diff --git a/frontend/src/app/main/ui/workspace/colorpicker/libraries.cljs b/frontend/src/app/main/ui/workspace/colorpicker/libraries.cljs index a28100789..2912a88fe 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker/libraries.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker/libraries.cljs @@ -66,8 +66,10 @@ (vals file-colors) :else ;; Library UUID - (map #(merge {:file-id (uuid @selected-library)}) - (vals (get-in shared-libs [(uuid @selected-library) :data :colors]))))] + (->> (get-in shared-libs [(uuid @selected-library) :data :colors]) + (vals) + (map #(merge % {:file-id (uuid @selected-library)}))))] + (reset! current-library-colors (into [] (filter check-valid-color?) mapped-colors))))) ;; If the file colors change and the file option is selected updates the state