🐛 Fix unlink library color when blur color picker input

This commit is contained in:
alonso.torres 2023-03-10 10:58:40 +01:00
parent ce85a1b1d5
commit 481e9b0d32
2 changed files with 6 additions and 4 deletions

View file

@ -65,11 +65,12 @@
handle-change-color
(mf/use-fn
(mf/deps @drag?)
(mf/deps current-color @drag?)
(fn [color]
(let [recent-color (merge current-color color)
recent-color (dc/materialize-color-components recent-color)]
(st/emit! (dc/update-colorpicker-color recent-color (not @drag?))))))
(when (not= (str/lower (:hex color)) (str/lower (:hex current-color)))
(let [recent-color (merge current-color color)
recent-color (dc/materialize-color-components recent-color)]
(st/emit! (dc/update-colorpicker-color recent-color (not @drag?)))))))
handle-click-picker
(mf/use-fn