fix: select options order changed when choosing values

This commit is contained in:
Tienson Qin
2025-09-03 17:03:24 +08:00
parent 1c947ef229
commit eb2ae991b3

View File

@@ -653,7 +653,8 @@
(f chosen selected?)))]
(hooks/use-effect!
(fn []
(set-items! (sort-select-items property selected-choices items)))
(when-not (= (count items) (count sorted-items))
(set-items! (sort-select-items property selected-choices items))))
[items])
(select/select (assoc opts
:selected-choices selected-choices