🐛 Avoid crash in combobox with empty options

This commit is contained in:
Andrés Moya 2025-07-01 09:48:51 +02:00 committed by Andrés Moya
parent 493831f110
commit 953287ea33
2 changed files with 5 additions and 2 deletions

View file

@ -206,10 +206,12 @@
selected-option
(mf/with-memo [options selected-id]
(get-option options selected-id))
(when (d/not-empty? options)
(get-option options selected-id)))
icon
(get selected-option :icon)]
(when selected-option
(get selected-option :icon))]
(mf/with-effect [dropdown-options]
(mf/set-ref-val! options-ref dropdown-options))

View file

@ -172,6 +172,7 @@
{:label group
:id group})
theme-groups)
on-update-group
(mf/use-fn
(mf/deps on-change-field)