mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 22:22:43 -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
|
(cond
|
||||||
(= :separator item) [:li {:class (stl/css :separator)
|
(= :separator item) [:li {:class (stl/css :separator)
|
||||||
:key (dm/str element-id "-" index)}]
|
: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)]
|
highlighted? (= highlighted index)]
|
||||||
[:li
|
[:li
|
||||||
{:key (str element-id "-" index)
|
{:key (str element-id "-" index)
|
||||||
|
@ -101,6 +103,7 @@
|
||||||
:is-selected selected?
|
:is-selected selected?
|
||||||
:is-highlighted highlighted?)
|
:is-highlighted highlighted?)
|
||||||
:data-label label
|
:data-label label
|
||||||
|
:disabled (seq errors)
|
||||||
:on-click #(on-select item)}
|
:on-click #(on-select item)}
|
||||||
[:span {:class (stl/css :label)} label]
|
[:span {:class (stl/css :label)} label]
|
||||||
[:span {:class (stl/css :value)} (wtc/resolve-token-value item)]
|
[:span {:class (stl/css :value)} (wtc/resolve-token-value item)]
|
||||||
|
|
Loading…
Add table
Reference in a new issue