Browse Source

fix: select options order changed when choosing values

Tienson Qin 4 months ago
parent
commit
eb2ae991b3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/frontend/components/property/value.cljs

+ 2 - 1
src/main/frontend/components/property/value.cljs

@@ -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