mirror of
https://github.com/penpot/penpot.git
synced 2026-08-06 21:08:34 +00:00
🐛 Avoid crash in combobox with empty options
This commit is contained in:
parent
493831f110
commit
953287ea33
@ -206,10 +206,12 @@
|
|||||||
|
|
||||||
selected-option
|
selected-option
|
||||||
(mf/with-memo [options selected-id]
|
(mf/with-memo [options selected-id]
|
||||||
(get-option options selected-id))
|
(when (d/not-empty? options)
|
||||||
|
(get-option options selected-id)))
|
||||||
|
|
||||||
icon
|
icon
|
||||||
(get selected-option :icon)]
|
(when selected-option
|
||||||
|
(get selected-option :icon))]
|
||||||
|
|
||||||
(mf/with-effect [dropdown-options]
|
(mf/with-effect [dropdown-options]
|
||||||
(mf/set-ref-val! options-ref dropdown-options))
|
(mf/set-ref-val! options-ref dropdown-options))
|
||||||
|
|||||||
@ -172,6 +172,7 @@
|
|||||||
{:label group
|
{:label group
|
||||||
:id group})
|
:id group})
|
||||||
theme-groups)
|
theme-groups)
|
||||||
|
|
||||||
on-update-group
|
on-update-group
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps on-change-field)
|
(mf/deps on-change-field)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user