mirror of
https://github.com/penpot/penpot.git
synced 2025-05-05 23:05:54 +02:00
⚡ Don't sort tokens on each rerender
This commit is contained in:
parent
1f450c83ec
commit
c1ce24e5f0
1 changed files with 5 additions and 1 deletions
|
@ -79,6 +79,10 @@
|
|||
(l/derived lens:token-type-open-status)))
|
||||
{:keys [modal attributes all-attributes title]} token-type-props
|
||||
|
||||
tokens
|
||||
(mf/with-memo [tokens]
|
||||
(vec (sort-by :name tokens)))
|
||||
|
||||
on-context-menu
|
||||
(mf/use-fn
|
||||
(fn [event token]
|
||||
|
@ -138,7 +142,7 @@
|
|||
(when open?
|
||||
[:& cmm/asset-section-block {:role :content}
|
||||
[:div {:class (stl/css :token-pills-wrapper)}
|
||||
(for [token (sort-by :name tokens)]
|
||||
(for [token tokens]
|
||||
(let [theme-token (get active-theme-tokens (:name token))
|
||||
multiple-selection (< 1 (count selected-shapes))
|
||||
full-applied (:all-selected? (attribute-actions token selected-shapes (or all-attributes attributes)))
|
||||
|
|
Loading…
Add table
Reference in a new issue