mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 23:21:38 +02:00
🐛 Fix library color selector
This commit is contained in:
parent
f3115f8f3a
commit
6e33d5b311
4 changed files with 23 additions and 25 deletions
|
@ -300,13 +300,13 @@
|
|||
[key default]
|
||||
(let [id (use-id)
|
||||
state (mf/use-state (get @storage key default))
|
||||
stream (mf/with-memo []
|
||||
stream (mf/with-memo [id]
|
||||
(->> mbc/stream
|
||||
(rx/filter #(= (:type %) key))
|
||||
(rx/filter #(not= (:id %) id))
|
||||
(rx/filter #(= (:type %) key))
|
||||
(rx/map deref)))]
|
||||
|
||||
(mf/with-effect [@state key]
|
||||
(mf/with-effect [@state key id]
|
||||
(mbc/emit! id key @state)
|
||||
(swap! storage assoc key @state))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue