mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 04:36:12 +02:00
🐛 Fixes problems with group options
This commit is contained in:
parent
4da1b46b05
commit
849eb7714c
1 changed files with 2 additions and 3 deletions
|
@ -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"]))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue