diff --git a/CHANGES.md b/CHANGES.md index 16dea801eb..b59234b7d3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,7 @@ - Fix id prop on switch component [Taiga #13534](https://tree.taiga.io/project/penpot/issue/13534) - Fix dashboard navigation tabs overlap with projects content when scrolling [Taiga #13962](https://tree.taiga.io/project/penpot/issue/13962) - Fix text editor v1 focus [Taiga #13961](https://tree.taiga.io/project/penpot/issue/13961) +- Fix color dropdown option update [Taiga #14035](https://tree.taiga.io/project/penpot/issue/14035) ## 2.15.0 (Unreleased) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/rows/color_row.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/rows/color_row.cljs index 120da5dced..b7d7bed534 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/rows/color_row.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/rows/color_row.cljs @@ -243,7 +243,16 @@ open-modal (mf/use-fn - (mf/deps disable-gradient disable-opacity disable-image disable-picker on-change on-close on-open tokens index applied-token) + (mf/deps disable-gradient + disable-opacity + disable-image + disable-picker + on-change + on-close + on-open + tokens + index + applied-token) (fn [color pos tab] (let [color (cond ^boolean has-multiple-colors @@ -348,6 +357,11 @@ (mf/with-effect [color prev-color disable-picker] (when (and (not disable-picker) (not= prev-color color)) (modal/update-props! :colorpicker {:data (parse-color color)}))) + + (mf/with-effect [applied-token disable-picker] + (when (not disable-picker) + (modal/update-props! :colorpicker {:applied-token applied-token}))) + [:div {:class [class row-class]} ;; Drag handler (when (some? on-reorder)