mirror of
https://github.com/penpot/penpot.git
synced 2025-06-08 00:51:37 +02:00
Sort image collections by name instead by id.
This commit is contained in:
parent
61db7aeab9
commit
ab4fb8030d
1 changed files with 3 additions and 3 deletions
|
@ -149,7 +149,7 @@
|
||||||
collections (cond->> (vals colls)
|
collections (cond->> (vals colls)
|
||||||
own? (filter #(= :own (:type %)))
|
own? (filter #(= :own (:type %)))
|
||||||
builtin? (filter #(= :builtin (:type %)))
|
builtin? (filter #(= :builtin (:type %)))
|
||||||
own? (sort-by :id))]
|
own? (sort-by :name))]
|
||||||
[:ul.library-elements
|
[:ul.library-elements
|
||||||
(when own?
|
(when own?
|
||||||
[:li
|
[:li
|
||||||
|
@ -171,8 +171,8 @@
|
||||||
(let [xf (comp
|
(let [xf (comp
|
||||||
(map second)
|
(map second)
|
||||||
(filter #(= type (:type %))))
|
(filter #(= type (:type %))))
|
||||||
colls (into [] xf colls)
|
colls (->> (into [] xf colls)
|
||||||
colls (sort-by :id colls)]
|
(sort-by :name))]
|
||||||
(if-let [item (first colls)]
|
(if-let [item (first colls)]
|
||||||
(rs/emit! (di/select-collection type (:id item)))
|
(rs/emit! (di/select-collection type (:id item)))
|
||||||
(rs/emit! (di/select-collection type)))))]
|
(rs/emit! (di/select-collection type)))))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue