mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Fixes problems with group options
This commit is contained in:
@@ -138,8 +138,7 @@
|
|||||||
|
|
||||||
extract-attrs
|
extract-attrs
|
||||||
(fn [[ids values] {:keys [id type shapes content] :as shape}]
|
(fn [[ids values] {:keys [id type shapes content] :as shape}]
|
||||||
(let [conj (fnil conj [])
|
(let [props (get-in type->props [type attr-type])
|
||||||
props (get-in type->props [type attr-type])
|
|
||||||
result (case props
|
result (case props
|
||||||
:ignore [ids values]
|
:ignore [ids values]
|
||||||
:shape [(conj ids id)
|
:shape [(conj ids id)
|
||||||
@@ -151,7 +150,7 @@
|
|||||||
:children (let [children (->> (:shapes shape []) (map #(get objects %)))]
|
:children (let [children (->> (:shapes shape []) (map #(get objects %)))]
|
||||||
(get-attrs children objects attr-type)))]
|
(get-attrs children objects attr-type)))]
|
||||||
result))]
|
result))]
|
||||||
(reduce extract-attrs [] shapes)))
|
(reduce extract-attrs [[] []] shapes)))
|
||||||
|
|
||||||
(mf/defc options
|
(mf/defc options
|
||||||
{::mf/wrap [#(mf/memo' % (mf/check-props ["shape" "shapes-with-children"]))]
|
{::mf/wrap [#(mf/memo' % (mf/check-props ["shape" "shapes-with-children"]))]
|
||||||
|
|||||||
Reference in New Issue
Block a user