mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
Remove items with missing references
This commit is contained in:
parent
23de79bd04
commit
5a8a32ddc7
1 changed files with 4 additions and 1 deletions
|
@ -93,7 +93,9 @@
|
|||
(cond
|
||||
(= :separator item) [:li {:class (stl/css :separator)
|
||||
:key (dm/str element-id "-" index)}]
|
||||
:else (let [{:keys [label selected?]} item
|
||||
;; Remove items with missing references
|
||||
(seq (:errors item)) nil
|
||||
:else (let [{:keys [label selected? errors]} item
|
||||
highlighted? (= highlighted index)]
|
||||
[:li
|
||||
{:key (str element-id "-" index)
|
||||
|
@ -101,6 +103,7 @@
|
|||
:is-selected selected?
|
||||
:is-highlighted highlighted?)
|
||||
:data-label label
|
||||
:disabled (seq errors)
|
||||
:on-click #(on-select item)}
|
||||
[:span {:class (stl/css :label)} label]
|
||||
[:span {:class (stl/css :value)} (wtc/resolve-token-value item)]
|
||||
|
|
Loading…
Add table
Reference in a new issue