[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Element Plus Select: ensure that default values are synced for disabled select elements

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68ddde6c3773_2cdeea490068@gitlab-sidekiq-low-urgency-cpu-bound-v2-697dcf96d-4lnmh.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
e50f4200 by Merci Jacob at 2025-10-02T01:58:10+00:00
[FIX] Element Plus Select: ensure that default values are synced for disabled select elements
---
* [FIX] Element Plus Select: ensure that default values are synced for disabled select elements

See merge request tikiwiki/tiki!8692

- - - - -


1 changed file:

- src/js/vue-widgets/element-plus-ui/src/helpers/select/applySelect.js


Changes:

=====================================
src/js/vue-widgets/element-plus-ui/src/helpers/select/applySelect.js
=====================================
@@ -51,7 +51,8 @@ export function syncSelectOptions(elementPlusSelect, select) {
         })
         .get();
     $(elementPlusSelect).attr("options", JSON.stringify(options));
-    $(elementPlusSelect).attr("value", JSON.stringify($(select).val()));
+    const value = [...select.selectedOptions].map((option) => option.value);
+    $(elementPlusSelect).attr("value", $(select).prop("multiple") ? JSON.stringify(value) : value[0]);
     if (options.find((option) => option.group)) {
         $(elementPlusSelect).attr("group", true);
     }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e50f42009c40131847d32a5ce9251face027d3b7

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e50f42009c40131847d32a5ce9251face027d3b7
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.