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

"Merci Jacob \(@mercihabam\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68de31ce3c5b2_2cdf0c069911@gitlab-sidekiq-low-urgency-cpu-bound-v2-575c7fdb85-wvgd7.mail>

Merci Jacob pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
4f84cc56 by Merci Jacob at 2025-10-02T08:03:21+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


(cherry picked from commit e50f42009c40131847d32a5ce9251face027d3b7)

ed5f35af [FIX] Element Plus Select: ensure that default values are synced for disabled select elements

Co-authored-by: Merci Jacob <[email protected]>
- - - - -


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/4f84cc564f407316bee52fabf1e839bdd7ddbf75

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/4f84cc564f407316bee52fabf1e839bdd7ddbf75
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.